[ANNOUNCE] xorg-server 1.7.99.902

Julien Cristau jcristau at debian.org
Wed Mar 24 09:36:48 PDT 2010


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


More information about the xorg-devel mailing list