On Wed, 2015-12-09 at 13:37 +0000, Eric Engestrom wrote:
> On 08/12/15 20:08, Adam Jackson wrote:
> 
> > +resourceTypeAtom(int i)
> > +{
> > +    CARD32 ret;
> > +
> > +    const char *name = LookupResourceName(i);
> > +    if (strcmp(name, XREGISTRY_UNKNOWN))
> > +        ret = MakeAtom(name, strlen(name), TRUE);
> > +    else {
> > +        char buf[40];
> > +
> > +        snprintf(buf, sizeof(buf), "Unregistered resource %i", i + 1);
> 
> Shouldn't that be just `i` ?

Probably? It's just factoring out what we were doing before. Though
honestly this whole code path is pretty useless if you're building
without X_RESOURCE_REGISTRY, which is the only way you should be able
to get XREGISTRY_UNKNOWN here. It might make sense in that case to cap
the extension at version 1.1, or throw BadImplementation for the 1.2
requests.

I've got a much longer series of xres accounting updates in the queue,
I'll rework this patch when I've got that in shape.

- ajax
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to