summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-12-29 22:11:29 +0100
committerraveit65 <[email protected]>2021-01-28 21:09:37 +0100
commitf343f45b504c6dd78736a505a7865a2cc3d353ed (patch)
tree2332d5c1b0c99e49317dc40d1dcc13fe06c90644
parent7cd5fe838cfe53c06827377ab05530095ef69325 (diff)
downloadeom-f343f45b504c6dd78736a505a7865a2cc3d353ed.tar.bz2
eom-f343f45b504c6dd78736a505a7865a2cc3d353ed.tar.xz
Remove cppcheck warning knownConditionTrueFalse
-rw-r--r--cut-n-paste/toolbar-editor/egg-editable-toolbar.c6
-rw-r--r--src/eom-file-chooser.c4
-rw-r--r--src/eom-image.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
index b92ec33..135b3bd 100644
--- a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
+++ b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
@@ -1107,12 +1107,14 @@ static void
update_fixed (EggEditableToolbar *etoolbar)
{
GtkWidget *toolbar, *dock;
- if (!etoolbar->priv->fixed_toolbar) return;
+
+ if (!etoolbar->priv->fixed_toolbar)
+ return;
toolbar = etoolbar->priv->fixed_toolbar;
dock = get_dock_nth (etoolbar, 0);
- if (dock && toolbar && gtk_widget_get_parent (toolbar) == NULL)
+ if (dock && gtk_widget_get_parent (toolbar) == NULL)
{
gtk_box_pack_end (GTK_BOX (dock), toolbar, FALSE, TRUE, 0);
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;
}