Re: [PATCH v3 1/3] Introduce die_errno() that appends strerror(errno) to die()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 08, 2009 at 11:02:18PM +0200, Thomas Rast wrote:

> +void die_errno(const char *fmt, ...)
> +{
> +	va_list params;
> +	char fmt_with_err[1024];
> +
> +	snprintf(fmt_with_err, sizeof(fmt_with_err), "%s: %s", fmt, strerror(errno));
> +
> +	va_start(params, fmt);
> +	die_routine(fmt_with_err, params);
> +	va_end(params);
> +}

Aren't you assuming that strerror(errno) has no '%'-signs here, which is
what kicked off the whole discussion?

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]