From 3beab65515ab693806a7b64665bfd287133e860e Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 20 Jul 2016 17:27:36 -0700 Subject: No need to check for string option values being null. A string option, if present, always has a value; it might be a null *string*, but you won't get a null pointer (if the option isn't present, it simply isn't present). Fix some comments while we're at it. Change-Id: I9c1420f56998a7d04de5c5cc2e92631b181f303a Reviewed-on: https://code.wireshark.org/review/16564 Reviewed-by: Guy Harris --- wiretap/merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wiretap/merge.c') diff --git a/wiretap/merge.c b/wiretap/merge.c index 7df0f2ba7b..85cc1d9d51 100644 --- a/wiretap/merge.c +++ b/wiretap/merge.c @@ -387,7 +387,7 @@ create_shb_header(const merge_in_file_t *in_files, const guint in_file_count, * XXX - fix this to handle multiple comments from a single file. */ if (wtap_block_get_nth_string_option_value(shb_hdr, OPT_COMMENT, 0, &shb_comment) == WTAP_OPTTYPE_SUCCESS && - shb_comment && strlen(shb_comment) > 0) { + strlen(shb_comment) > 0) { /* very lame way to save comments - does not save them from the other files */ g_string_append_printf(comment_gstr, "%s \n",shb_comment); } -- cgit v1.2.3