]> err.no Git - varnish/commitdiff
Flexelint
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 15 Jun 2008 19:53:36 +0000 (19:53 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 15 Jun 2008 19:53:36 +0000 (19:53 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2689 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/vtc.c

index 30acac712a9ffe774852dda04be8c2ea58f9f13e..7dd568d4d438174c3027cf80e784faac79fa720c 100644 (file)
@@ -56,28 +56,29 @@ vct_dump(const char *ident, const char *pfx, const char *str)
        vsb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND);
        if (str == NULL) 
                vsb_printf(vsb, "#### %-4s %s(null)\n", ident, pfx);
-       for(; *str; str++) {
-               if (nl) {
-                       vsb_printf(vsb, "#### %-4s %s| ", ident, pfx);
-                       nl = 0;
+       else
+               for(; *str; str++) {
+                       if (nl) {
+                               vsb_printf(vsb, "#### %-4s %s| ", ident, pfx);
+                               nl = 0;
+                       }
+                       if (*str == '\r')
+                               vsb_printf(vsb, "\\r");
+                       else if (*str == '\t')
+                               vsb_printf(vsb, "\\t");
+                       else if (*str == '\n') {
+                               vsb_printf(vsb, "\\n\n");
+                               nl = 1;
+                       } else if (*str < 0x20 || *str > 0x7e)
+                               vsb_printf(vsb, "\\x%02x", *str);
+                       else
+                               vsb_printf(vsb, "%c", *str);
                }
-               if (*str == '\r')
-                       vsb_printf(vsb, "\\r");
-               else if (*str == '\t')
-                       vsb_printf(vsb, "\\t");
-               else if (*str == '\n') {
-                       vsb_printf(vsb, "\\n\n");
-                       nl = 1;
-               } else if (*str < 0x20 || *str > 0x7e)
-                       vsb_printf(vsb, "\\x%02x", *str);
-               else
-                       vsb_printf(vsb, "%c", *str);
-       }
        if (!nl)
                vsb_printf(vsb, "\n");
        vsb_finish(vsb);
        AZ(vsb_overflowed(vsb));
-       fputs(vsb_data(vsb), stdout);
+       (void)fputs(vsb_data(vsb), stdout);
        vsb_delete(vsb);
 }