From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Prendel Date: Mon, 15 Jun 2009 07:47:13 +0000 Subject: [lm-sensors] [PATCH 1/5] sensord: Fix coding style Message-Id: <20090615074713.GE4667@ubuntu> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lm-sensors@vger.kernel.org This patch fixes some coding style issues. * Remove whitespaces between variable and increment operator. * Break long lines. --- rrd.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) Index: sensors/prog/sensord/rrd.c =================================--- sensors.orig/prog/sensord/rrd.c 2009-06-09 19:45:56.000000000 +0200 +++ sensors/prog/sensord/rrd.c 2009-06-09 20:27:00.000000000 +0200 @@ -99,7 +99,7 @@ } else { buffer[i] = '_'; } - ++ i; + ++i; } buffer[i] = '\0'; @@ -108,7 +108,7 @@ /* locate duplicates */ while (okay && (j < index0)) - okay = strcmp(rrdLabels[j ++], buffer); + okay = strcmp(rrdLabels[j++], buffer); /* uniquify duplicate labels with _? or _?? */ while (!okay) { @@ -449,13 +449,19 @@ { int ret = 0, i; - printf("#!" RRDCGI "\n\n\n\nsensord\n\n\n

sensord

\n"); + printf("#!" RRDCGI "\n\n\n" + "\nsensord\n\n" + "\n

sensord

\n"); + for (i = 0; i < ARRAY_SIZE(graphs); i++) { struct gr *graph = &graphs[i]; printf("

%s

\n", graph->h2); - printf("

\n'\n\t-a PNG\n\t-h 200 -w 800\n", + printf("

\n'" + "\n\t-a PNG\n\t-h 200 -w 800\n", sensord_args.cgiDir, graph->image); + printf("\t--lazy\n\t-v '%s'\n\t-t '%s'\n\t-x '%s'\n\t%s", graph->axisTitle, graph->title, graph->axisDefn, graph->options); @@ -469,7 +475,12 @@ ret = rrdCGI_LINE(graph, LOADAVG, LOAD_AVERAGE, NULL); printf (">\n

\n"); } - printf("

\nsensord by Merlin Hughes, all credit to the lm_sensors crew.\n

\n"); + printf("

\nsensord by " + "Merlin Hughes" + ", all credit to the " + "lm_sensors " + "crew.\n

\n"); + printf("\n\n"); return ret; _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors