From 1c97d2e79fd2c355114c9116bde5931bb0eabe9f Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 12 Jul 2017 18:17:58 +0200 Subject: thumbnail: Use g_strcmp0() and remove a NULL check origin commit: https://gitlab.gnome.org/GNOME/gnome-desktop/commit/a5188e5 --- libmate-desktop/mate-desktop-thumbnail.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'libmate-desktop/mate-desktop-thumbnail.c') 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"); -- cgit v1.2.1