From 05476c4d04a24bdb26fa64e05ab31bc36118f34e Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Sun, 18 May 2014 11:42:26 +0200 Subject: IPv4/IPv6 integrated socket code. --- lib/printf.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/printf.c') diff --git a/lib/printf.c b/lib/printf.c index 41e1cc0d..ebecc140 100644 --- a/lib/printf.c +++ b/lib/printf.c @@ -221,6 +221,16 @@ int bvsnprintf(char *buf, int size, const char *fmt, va_list args) continue; case 'm': + if (flags & SPECIAL) { + if (!errno) + continue; + if (size < 2) + return -1; + *str++ = ':'; + *str++ = ' '; + start += 2; + size -= 2; + } s = strerror(errno); goto str; case 'M': -- cgit v1.2.3