[ccache] [PATCH v3] add support for '@' parameters

Jürgen Buchmüller pullmoll at t-online.de
Mon Jul 30 17:46:08 MDT 2012


Am Montag, den 30.07.2012, 16:05 -0700 schrieb Andrew Boie:
[..snip..]
> +		/* Trivial case; replace with 1 element */
> +		dest->argv[index] = x_strdup(src->argv[0]);
[..snap..]

Shouldn't dest->argv[index] be free()d before overwriting it?

> +	/* Copy the new arguments into place */
> +	for (j = 0; j < src->argc; j++)
> +		dest->argv[j + index] = x_strdup(src->argv[j]);

Shouldn't src->argv[j] be free()d after it is strdup()ed?
Or alternatively: why not copy src->argv[j] an re-use it?

The code patch doesn't seem to be too clean.. just my 'feeling' :-P
Excuse me, if I overlooked something essential.

Juergen






More information about the ccache mailing list