From 4ad248e3e29bc06688b57fd7aebdcbd5bbb2a7c6 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 18 May 2008 15:11:52 +0000 Subject: [PATCH] fix indenting git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1369 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_dump.c | 29 ++++++++++++++--------------- program/src/rrd_tool.c | 1 + 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/program/src/rrd_dump.c b/program/src/rrd_dump.c index bb83815c..7b972e9d 100644 --- a/program/src/rrd_dump.c +++ b/program/src/rrd_dump.c @@ -52,8 +52,7 @@ extern char *tzname[2]; int rrd_dump_opt_r( const char *filename, char *outname, - int opt_noheader -) + int opt_noheader) { unsigned int i, ii, ix, iii = 0; time_t now; @@ -81,11 +80,11 @@ int rrd_dump_opt_r( out_file = stdout; } - if (!opt_noheader){ - fputs("\n", out_file); - fputs - ("\n", - out_file); + if (!opt_noheader) { + fputs("\n", out_file); + fputs + ("\n", + out_file); } fputs("", out_file); fputs("", out_file); @@ -433,7 +432,7 @@ int rrd_dump_r( const char *filename, char *outname) { - return rrd_dump_opt_r(filename,outname,0); + return rrd_dump_opt_r(filename, outname, 0); } int rrd_dump( @@ -442,13 +441,14 @@ int rrd_dump( { int rc; int opt_noheader = 0; + /* init rrd clean */ optind = 0; opterr = 0; /* initialize getopt */ - + while (42) { - int opt; + int opt; int option_index = 0; static struct option long_options[] = { {"no-header", no_argument, 0, 'n'}, @@ -465,9 +465,9 @@ int rrd_dump( opt_noheader = 1; break; - default: + default: rrd_set_error("usage rrdtool %s [--no-header|-n] " - "file.rrd [file.xml]", argv[0]); + "file.rrd [file.xml]", argv[0]); return (-1); break; } @@ -480,11 +480,10 @@ int rrd_dump( } if ((argc - optind) == 2) { - rc = rrd_dump_opt_r(argv[optind], argv[optind+1],opt_noheader); + rc = rrd_dump_opt_r(argv[optind], argv[optind + 1], opt_noheader); } else { - rc = rrd_dump_opt_r(argv[optind], NULL,opt_noheader); + rc = rrd_dump_opt_r(argv[optind], NULL, opt_noheader); } return rc; } - diff --git a/program/src/rrd_tool.c b/program/src/rrd_tool.c index c981e4a7..b594a5f4 100644 --- a/program/src/rrd_tool.c +++ b/program/src/rrd_tool.c @@ -804,6 +804,7 @@ int HandleInputLine( } else if (strcmp("graphv", argv[1]) == 0) { info_t *grinfo = NULL; /* 1 to distinguish it from the NULL that rrd_graph sends in */ + grinfo = rrd_graph_v(argc - 1, &argv[1]); if (grinfo) { info_print(grinfo); -- 2.30.2