Hi,

On Thu, Jul 07, 2011 at 11:33:53AM +0200, Robert Millan wrote:

> -     (void)snprintf(fname, sizeof fname, "../../conf/options.%s",
> +     (void)asprintf(&fname, "../../conf/options.%s",
>           machinename);

Ignoring the return value of asprintf() is not a good idea, as it can
indicate a failed allocation.

On a related note, the return value of strdup() also should be checked.

-antrik-
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to