diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-10-27 20:18:50 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-10-27 20:18:50 +0000 |
commit | 00289560b6e6c7cbdedb58d5d30d0a6171c65214 (patch) | |
tree | 96740dae1bc6cd95ddaec44b38899702970ead84 /proto_hier_stats.c | |
parent | 82fd8ce16067504781babb0fdef0cc6b174776cd (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?)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16347 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'proto_hier_stats.c')
-rw-r--r-- | proto_hier_stats.c | 10 |
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; |