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 <wireshark@kaiser.cx>
This commit is contained in:
Martin Kaiser 2015-04-04 19:15:50 +02:00
parent e4da62fefe
commit 2b7f87587c
1 changed files with 4 additions and 8 deletions

View File

@ -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 = '"';