I'll try and look at the patch more carefully in a few days, but:

On Wed, Mar 24, 2010 at 09:20:24 -0700, Dan Nicholson wrote:

> +             if (!cptr)
> +                 return NULL;
> +             memcpy(cptr, ptr, sizeof(GDevRec));
> +             cptr->identifier = xnfcalloc(1,strlen("Autoconfigured Video 
> Device ")+strlen(matches[i])+1);
> +             sprintf(cptr->identifier, "Autoconfigured Video Device %s", 
> matches[i]);
> 
> Seems you could use xnfalloc since you immediately memcpy/sprintf over the
> allocations anyway.

cptr->identifier = Xprintf("Autoconfigured Video Device %s", matches[i]);

should do what you want.

Cheers,
Julien
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to