aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-07-17 21:34:11 -0700
committerGuy Harris <guy@alum.mit.edu>2017-07-18 04:34:42 +0000
commit6d025eff1b41cb99a60b50c36de15803f6e8076f (patch)
tree946ab98c22d4153d7443039cfc0c029ee257ce13 /wiretap
parent5fd255424fda27b1ca9ded48a83da31405ae1731 (diff)
Do the meta-tag stuff the same way in all three cases.
Undo most of the changes, but turn the return at the end of the default case into a break. Change-Id: I022b62a85254ff188f19fd3d7c3fe40b0789b3d2 Reviewed-on: https://code.wireshark.org/review/22695 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/erf.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/wiretap/erf.c b/wiretap/erf.c
index 6e5f8546cf..ac0420f9c5 100644
--- a/wiretap/erf.c
+++ b/wiretap/erf.c
@@ -1021,10 +1021,12 @@ static void erf_write_wtap_option_to_capture_tag(wtap_block_t block _U_,
break;
default:
erf_meta_tag_free(tag_ptr);
- return;
+ tag_ptr = NULL;
+ break;
}
- g_ptr_array_add(section_ptr->tags, tag_ptr);
+ if (tag_ptr)
+ g_ptr_array_add(section_ptr->tags, tag_ptr);
}
static void erf_write_wtap_option_to_host_tag(wtap_block_t block _U_,
@@ -1051,10 +1053,12 @@ static void erf_write_wtap_option_to_host_tag(wtap_block_t block _U_,
break;
default:
erf_meta_tag_free(tag_ptr);
- return;
+ tag_ptr = NULL;
+ break;
}
- g_ptr_array_add(section_ptr->tags, tag_ptr);
+ if (tag_ptr)
+ g_ptr_array_add(section_ptr->tags, tag_ptr);
}
static void erf_write_wtap_option_to_interface_tag(wtap_block_t block _U_,