[PATCH] parser/scan.c: use strdup

Dan Nicholson dbn.lists at gmail.com
Wed Jun 16 13:23:07 PDT 2010


On Wed, Jun 16, 2010 at 1:15 PM, Matt Turner <mattst88 at gmail.com> wrote:
> Found using
> ---
> @@
> expression E;
> identifier i;
> identifier address;
> @@
>
> - i = malloc(strlen(E) + 1);
> - strcpy(address, E);
> + i = strdup(E);
> ---
>
> Signed-off-by: Matt Turner <mattst88 at gmail.com>

Yes, please.

Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>

--
Dan


More information about the xorg-devel mailing list