summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <[email protected]>2017-07-12 18:17:58 +0200
committerraveit65 <[email protected]>2020-01-18 23:46:03 +0100
commit1c97d2e79fd2c355114c9116bde5931bb0eabe9f (patch)
tree4874672eb0dc6aba29c90aba1bfa2bba06ca338d
parent222be2c475799710ec83baba18d323ff003bdd15 (diff)
downloadmate-desktop-1c97d2e79fd2c355114c9116bde5931bb0eabe9f.tar.bz2
mate-desktop-1c97d2e79fd2c355114c9116bde5931bb0eabe9f.tar.xz
thumbnail: Use g_strcmp0() and remove a NULL check
origin commit: https://gitlab.gnome.org/GNOME/gnome-desktop/commit/a5188e5
-rw-r--r--libmate-desktop/mate-desktop-thumbnail.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libmate-desktop/mate-desktop-thumbnail.c b/libmate-desktop/mate-desktop-thumbnail.c
index 3280ee1..08fc510 100644
--- a/libmate-desktop/mate-desktop-thumbnail.c
+++ b/libmate-desktop/mate-desktop-thumbnail.c
@@ -1276,10 +1276,7 @@ mate_desktop_thumbnail_has_uri (GdkPixbuf *pixbuf,
const char *thumb_uri;
thumb_uri = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::URI");
- if (!thumb_uri)
- return FALSE;
-
- return strcmp (uri, thumb_uri) == 0;
+ return (g_strcmp0 (uri, thumb_uri) == 0);
}
/**
@@ -1304,9 +1301,7 @@ mate_desktop_thumbnail_is_valid (GdkPixbuf *pixbuf,
time_t thumb_mtime;
thumb_uri = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::URI");
- if (!thumb_uri)
- return FALSE;
- if (strcmp (uri, thumb_uri) != 0)
+ if (g_strcmp0 (uri, thumb_uri) != 0)
return FALSE;
thumb_mtime_str = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::MTime");