From: Rich Felker Date: Thu, 16 Aug 2012 02:35:02 +0000 (-0400) Subject: handle null arguments to legacy bsd err.h functions X-Git-Tag: v0.9.4~7 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dc82ee4e30ec0eae367f7ab076a7325b4d858dd5;p=oweals%2Fmusl.git handle null arguments to legacy bsd err.h functions --- diff --git a/src/linux/err.c b/src/linux/err.c index abc26806..c291136d 100644 --- a/src/linux/err.c +++ b/src/linux/err.c @@ -5,13 +5,13 @@ void vwarn(const char *fmt, va_list ap) { - vfprintf(stderr, fmt, ap); + if (fmt) vfprintf(stderr, fmt, ap); perror(""); } void vwarnx(const char *fmt, va_list ap) { - vfprintf(stderr, fmt, ap); + if (fmt) vfprintf(stderr, fmt, ap); putc('\n', stderr); }