]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Fix uninitialized variable when double checking the top users
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Sat, 18 Sep 2010 12:39:06 +0000 (12:39 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Sat, 18 Sep 2010 12:39:06 +0000 (12:39 +0000)
The configuration option --enable-doublecheck was compiling in an
invalid piece of code that could potentially use an uninitialized
variable when building the list of the top users.

topuser.c

index f5aa4feff564f5c9db473c3a574603e7757ce76c..37082b7d62b8d36634365544efd1da6428ded513 100644 (file)
--- a/topuser.c
+++ b/topuser.c
@@ -318,7 +318,7 @@ void topuser(void)
          fprintf(fp_top3,"<td class=\"data\">%3.2lf%%</td><td class=\"data\">%3.2lf%%</td>",inperc,ouperc);
 #ifdef ENABLE_DOUBLE_CHECK_DATA
          if (fabs(inperc+ouperc-100.)>=0.01) {
-            debuga(_("The total of the in-cache and cache-miss is not 100%% at position %d of user %s\n"),posicao,uinfo->label);
+            debuga(_("The total of the in-cache and cache-miss is not 100%% at position %d (user %s)\n"),posicao,uinfo->label);
          }
 #endif
       }
@@ -360,7 +360,7 @@ void topuser(void)
          fprintf(fp_top3,"<th class=\"header_r\">%3.2lf%%</th><th class=\"header_r\">%3.2lf%%</th>",inperc,ouperc);
 #ifdef ENABLE_DOUBLE_CHECK_DATA
          if (fabs(inperc+ouperc-100.)>=0.01) {
-            debuga(_("The total of the in-cache and cache-miss is not 100%% for user %s\n"),uinfo->label);
+            debuga(_("The total of the in-cache and cache-miss is not 100%%\n"));
          }
 #endif
       }