From: Frédéric Marchal Date: Sat, 18 Sep 2010 12:39:06 +0000 (+0000) Subject: Fix uninitialized variable when double checking the top users X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d80418e8f157f58faec17a14577972f61c3a0d60;p=thirdparty%2Fsarg.git Fix uninitialized variable when double checking the top users 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. --- diff --git a/topuser.c b/topuser.c index f5aa4fe..37082b7 100644 --- a/topuser.c +++ b/topuser.c @@ -318,7 +318,7 @@ void topuser(void) fprintf(fp_top3,"%3.2lf%%%3.2lf%%",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,"%3.2lf%%%3.2lf%%",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 }