summaryrefslogtreecommitdiff
path: root/ui/gtk/compare_stat.c
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2015-08-18 07:01:35 +0100
committerMichael Mann <mmann78@netscape.net>2015-08-22 14:46:14 +0000
commit15ed3351bf6b8f017512d29d96a2b2889c797f6d (patch)
treec72d02a5a0f5c7018983c0783d0bf999c8147bcb /ui/gtk/compare_stat.c
parent9c331f73b5be7cde6b04b6cb68cf73deb4bdc4ce (diff)
downloadwireshark-15ed3351bf6b8f017512d29d96a2b2889c797f6d.tar.gz
[CLI, GTK] comparestat: Fix typos, output format, argument parsing
Optional filter argument wasn't correctly parsed. Change-Id: Ic0418fa866e1a00880b4e41bb28267a155a71aa5 Reviewed-on: https://code.wireshark.org/review/10088 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/gtk/compare_stat.c')
-rw-r--r--ui/gtk/compare_stat.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/ui/gtk/compare_stat.c b/ui/gtk/compare_stat.c
index d446f34f6b..7f3df82d7e 100644
--- a/ui/gtk/compare_stat.c
+++ b/ui/gtk/compare_stat.c
@@ -699,14 +699,8 @@ gtk_comparestat_init(const char *opt_arg, void* userdata _U_)
GString *error_string;
if(sscanf(opt_arg,"compare,%d,%d,%d,%d,%lf%n",&start, &stop, &ttl, &order, &variance, &pos)==5){
- if(pos){
- if(*(opt_arg+pos)==',')
- filter=opt_arg+pos+1;
- else
- filter=opt_arg+pos;
- } else {
- filter=NULL;
- }
+ if(*(opt_arg+pos)==',')
+ filter=opt_arg+pos+1;
} else {
fprintf(stderr, "wireshark: invalid \"-z compare,<start>,<stop>,<ttl[0|1]>,<order[0|1]>,<variance>[,<filter>]\" argument\n");
exit(1);