aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/file.c b/file.c
index 73eef29fe8..f1773697be 100644
--- a/file.c
+++ b/file.c
@@ -3866,11 +3866,9 @@ cf_update_capture_comment(capture_file *cf, gchar *comment)
wtap_block_add_string_option(shb_inf, OPT_COMMENT, comment, strlen(comment));
} else {
/* See if the comment has changed or not */
- if (shb_comment) {
- if (strcmp(shb_comment, comment) == 0) {
- g_free(comment);
- return;
- }
+ if (strcmp(shb_comment, comment) == 0) {
+ g_free(comment);
+ return;
}
/* The comment has changed, let's update it */