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-Url: http://nsz.repo.hu/git/?p=musl;a=commitdiff_plain;h=dc82ee4e30ec0eae367f7ab076a7325b4d858dd5;hp=3f80afc50577dada3940b66ef5b67da2f43cc00a 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); }