aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-07-17 18:32:39 -0700
committerGuy Harris <guy@alum.mit.edu>2017-07-18 01:33:10 +0000
commitd35bb66516b25a4adf3f0471a1c6256680e4491a (patch)
tree1d56bd8b2508d7c88fecdc1eb1fe1f632cfec872 /wiretap
parent8dcb530de6372580fa08659f1b230a86ac53d553 (diff)
Remove unnecessary test.
The default case ends with return, so the pointer won't be null by the time out exit the case statement - either a non-default case is processed and tag_ptr hasn't been set to null, or the default case is processed and you return before getting there. That also means we don't need to set tag_ptr to null in that case. Fixes CID 1415439. Change-Id: Id2609c0828561c560820f9cb5e6b5a0ae614aead Reviewed-on: https://code.wireshark.org/review/22686 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/erf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/wiretap/erf.c b/wiretap/erf.c
index b141cd3c20..77d5ee6323 100644
--- a/wiretap/erf.c
+++ b/wiretap/erf.c
@@ -1021,12 +1021,10 @@ static void erf_write_wtap_option_to_capture_tag(wtap_block_t block _U_,
break;
default:
erf_meta_tag_free(tag_ptr);
- tag_ptr = NULL;
return;
}
- if (tag_ptr)
- g_ptr_array_add(section_ptr->tags, 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_,