[4.0] 44d9e96 Indent
Lasse Karstensen
lkarsten at varnish-software.com
Thu Jan 15 16:35:43 CET 2015
commit 44d9e966c892fc27d10d616bb61fc0e4dc2660b4
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Wed Jan 7 09:17:37 2015 +0000
Indent
diff --git a/bin/varnishstat/varnishstat.c b/bin/varnishstat/varnishstat.c
index f5153b4..7f00317 100644
--- a/bin/varnishstat/varnishstat.c
+++ b/bin/varnishstat/varnishstat.c
@@ -104,7 +104,10 @@ do_json_cb(void *priv, const struct VSC_point * const pt)
val = *(const volatile uint64_t*)pt->ptr;
sec = pt->section;
- if (*jp) *jp = 0; else printf(",\n");
+ if (*jp)
+ *jp = 0;
+ else
+ printf(",\n");
printf("\t\"");
/* build the JSON key name. */
@@ -113,19 +116,17 @@ do_json_cb(void *priv, const struct VSC_point * const pt)
if (sec->fantom->ident[0])
printf("%s.", sec->fantom->ident);
printf("%s\": {", pt->desc->name);
-
- if (strcmp(sec->fantom->type, "")) printf("\"type\": \"%s\", ",
- sec->fantom->type);
- if (strcmp(sec->fantom->ident, "")) printf("\"ident\": \"%s\", ",
- sec->fantom->ident);
-
+ if (strcmp(sec->fantom->type, ""))
+ printf("\"type\": \"%s\", ", sec->fantom->type);
+ if (strcmp(sec->fantom->ident, ""))
+ printf("\"ident\": \"%s\", ", sec->fantom->ident);
printf("\"value\": %ju, ", (uintmax_t)val);
-
printf("\"flag\": \"%c\", ", pt->desc->flag);
printf("\"description\": \"%s\"", pt->desc->sdesc);
printf("}");
- if (*jp) printf("\n");
+ if (*jp)
+ printf("\n");
return (0);
}
@@ -325,12 +326,12 @@ main(int argc, char * const *argv)
do_once(vd, VSC_Main(vd, NULL));
else if (f_list)
list_fields(vd);
- else {
+ else
assert(0);
- }
- if (!do_repeat) break;
+ if (!do_repeat)
+ break;
- // end of output block marker.
+ /* end of output block marker. */
printf("\n");
(void)usleep(delay * 1e6);
More information about the varnish-commit
mailing list