From dc82ee4e30ec0eae367f7ab076a7325b4d858dd5 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 15 Aug 2012 22:35:02 -0400 Subject: [PATCH] handle null arguments to legacy bsd err.h functions --- src/linux/err.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.25.1