printf: (allegedly) fix testsuite failure
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 26 Jun 2009 22:07:23 +0000 (00:07 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 26 Jun 2009 22:07:23 +0000 (00:07 +0200)
Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/printf.c

index 5b326c643d3c863ac14ccbcfa6af86381952b4a6..eb53fa490690f4264c76c50045b606bca662bb74 100644 (file)
@@ -152,6 +152,8 @@ static void print_direc(char *format, unsigned fmt_length,
        if (have_width - 1 == have_prec)
                have_width = NULL;
 
+       errno = 0;
+
        switch (format[fmt_length - 1]) {
        case 'c':
                printf(format, *argument);