diff options
author | Guy Harris <guy@alum.mit.edu> | 2020-04-03 11:47:59 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-04-03 18:48:40 +0000 |
commit | e285c7c1da6ead0de75ab11de4af0c13d0dea297 (patch) | |
tree | 66e2f6c60a7da9c70d36a426bb6b3411dbe6b588 /file.c | |
parent | 5a9c86f5a7baf92214011f4257258d6b2bafc09a (diff) |
Eliminate duplicate code.
If we're not going to distinguish between "Loading" and "Reloading" in
the progress bar here, we don't need to check, when creating the
progress bar, whether we're loading or reloading.
Should fix Coverity CID 1461194.
Change-Id: Ib58799c3a43a7ff549006034e2a47cce1ea87a98
Reviewed-on: https://code.wireshark.org/review/36689
Reviewed-by: Guy Harris <gharris@sonic.net>
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -585,12 +585,8 @@ cf_read(capture_file *cf, gboolean reloading) /* Create the progress bar if necessary. */ if (progress_is_slow(progbar, prog_timer, size, file_pos)) { progbar_val = calc_progbar_val(cf, size, file_pos, status_str, sizeof(status_str)); - if (reloading) - progbar = delayed_create_progress_dlg(cf->window, NULL, NULL, - TRUE, &cf->stop_flag, progbar_val); - else - progbar = delayed_create_progress_dlg(cf->window, NULL, NULL, - TRUE, &cf->stop_flag, progbar_val); + progbar = delayed_create_progress_dlg(cf->window, NULL, NULL, TRUE, + &cf->stop_flag, progbar_val); } /* |