From f343f45b504c6dd78736a505a7865a2cc3d353ed Mon Sep 17 00:00:00 2001 From: rbuj Date: Tue, 29 Dec 2020 22:11:29 +0100 Subject: Remove cppcheck warning knownConditionTrueFalse --- src/eom-file-chooser.c | 4 +--- src/eom-image.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/eom-file-chooser.c b/src/eom-file-chooser.c index 009b45b..342c600 100644 --- a/src/eom-file-chooser.c +++ b/src/eom-file-chooser.c @@ -379,9 +379,7 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data) set_preview_pixbuf (EOM_FILE_CHOOSER (file_chooser), pixbuf, g_file_info_get_size (file_info)); - if (pixbuf != NULL) { - g_object_unref (pixbuf); - } + g_object_unref (pixbuf); } } diff --git a/src/eom-image.c b/src/eom-image.c index cbcf126..cc667a8 100644 --- a/src/eom-image.c +++ b/src/eom-image.c @@ -1948,7 +1948,7 @@ eom_image_get_caption (EomImage *img) /* Guaranteed to be correct utf8 here */ validated = TRUE; } - } else if (!broken_filenames) { + } else { /* name was valid, no need to re-validate */ validated = TRUE; } -- cgit v1.2.1