From 2b7f87587c2aa64a1f8c10c5beb66542e7ec5260 Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Sat, 4 Apr 2015 19:15:50 +0200 Subject: change several (mutually exclusive) if statements into one big if-else Change-Id: Ib3614431c3ff8f6e53fa0993e296ffea70926d03 Reviewed-on: https://code.wireshark.org/review/7911 Reviewed-by: Martin Kaiser --- epan/print.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'epan/print.c') diff --git a/epan/print.c b/epan/print.c index ad4ef5cc0d..1c2692dc84 100644 --- a/epan/print.c +++ b/epan/print.c @@ -1134,8 +1134,7 @@ gboolean output_fields_set_option(output_fields_t *info, gchar *option) } return TRUE; } - - if (0 == strcmp(option_name, "separator")) { + else if (0 == strcmp(option_name, "separator")) { switch (*option_value) { case '/': switch (*++option_value) { @@ -1155,8 +1154,7 @@ gboolean output_fields_set_option(output_fields_t *info, gchar *option) } return TRUE; } - - if (0 == strcmp(option_name, "occurrence")) { + else if (0 == strcmp(option_name, "occurrence")) { switch (*option_value) { case 'f': case 'l': @@ -1168,8 +1166,7 @@ gboolean output_fields_set_option(output_fields_t *info, gchar *option) } return TRUE; } - - if (0 == strcmp(option_name, "aggregator")) { + else if (0 == strcmp(option_name, "aggregator")) { switch (*option_value) { case '/': switch (*++option_value) { @@ -1186,8 +1183,7 @@ gboolean output_fields_set_option(output_fields_t *info, gchar *option) } return TRUE; } - - if (0 == strcmp(option_name, "quote")) { + else if (0 == strcmp(option_name, "quote")) { switch (*option_value) { case 'd': info->quote = '"'; -- cgit v1.2.1