aboutsummaryrefslogtreecommitdiffstats
path: root/proto_hier_stats.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-10-27 20:18:50 +0000
committerGuy Harris <guy@alum.mit.edu>2005-10-27 20:18:50 +0000
commiteb7e8111c675f167306b28462577550ac3678db2 (patch)
tree96740dae1bc6cd95ddaec44b38899702970ead84 /proto_hier_stats.c
parent6ed8c9a07bc42d2d5ca8ce2d5382bbaa5c2e5c29 (diff)
Fix uninitialized variable errors.
Rename some variables to make the names used in progress bars more common. (Should more of that functionality be moved into common progress bar code?) svn path=/trunk/; revision=16347
Diffstat (limited to 'proto_hier_stats.c')
-rw-r--r--proto_hier_stats.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/proto_hier_stats.c b/proto_hier_stats.c
index bf67fecf88..0e0d602988 100644
--- a/proto_hier_stats.c
+++ b/proto_hier_stats.c
@@ -179,7 +179,7 @@ ph_stats_new(void)
progdlg_t *progbar = NULL;
gboolean stop_flag;
int count;
- float prog_val;
+ float progbar_val;
GTimeVal start_time;
gchar status_str[100];
int progbar_nextstep;
@@ -200,6 +200,8 @@ ph_stats_new(void)
progbar_quantum = cfile.count/N_PROGBAR_UPDATES;
/* Count of packets at which we've looked. */
count = 0;
+ /* Progress so far. */
+ progbar_val = 0.0;
stop_flag = FALSE;
g_get_current_time(&start_time);
@@ -217,7 +219,7 @@ ph_stats_new(void)
if (progbar == NULL)
progbar = delayed_create_progress_dlg(
"Computing", "protocol hierarchy statistics",
- &stop_flag, &start_time, prog_val);
+ &stop_flag, &start_time, progbar_val);
/* Update the progress bar, but do it only N_PROGBAR_UPDATES
times; when we update it, we have to run the GTK+ main
@@ -231,12 +233,12 @@ ph_stats_new(void)
*/
g_assert(cfile.count > 0);
- prog_val = (gfloat) count / cfile.count;
+ progbar_val = (gfloat) count / cfile.count;
if (progbar != NULL) {
g_snprintf(status_str, sizeof(status_str),
"%4u of %u frames", count, cfile.count);
- update_progress_dlg(progbar, prog_val, status_str);
+ update_progress_dlg(progbar, progbar_val, status_str);
}
progbar_nextstep += progbar_quantum;