changeset 865:8676ba4f3ba9 HEAD

Allow %m in printf_string_upper_bound(). Fixes syslog failure handler.
author Timo Sirainen <tss@iki.fi>
date Sat, 28 Dec 2002 10:01:45 +0200
parents a090577ffdca
children 43a42c16bba8
files src/lib/printf-upper-bound.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/printf-upper-bound.c	Sat Dec 28 09:09:28 2002 +0200
+++ b/src/lib/printf-upper-bound.c	Sat Dec 28 10:01:45 2002 +0200
@@ -282,6 +282,12 @@
 		  conv_done = TRUE;
 		  (void) va_arg (args, void*);
                   break;
+		case 'm':
+		  /* normally we shouldn't even get here, but we could be just
+		     checking the format string is valid before giving the
+		     format to vsyslog(). */
+		  conv_len += strlen(strerror(errno)) + 256;
+		  break;
 
                   /* handle invalid cases
                    */