[gnome-desktop] thumbnail: Use g_strcmp0() and remove a NULL check
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] thumbnail: Use g_strcmp0() and remove a NULL check
- Date: Thu, 20 Jul 2017 23:21:29 +0000 (UTC)
commit a5188e5821b276e0572b9db4799b24f0993349c0
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jul 12 18:17:58 2017 +0200
thumbnail: Use g_strcmp0() and remove a NULL check
libgnome-desktop/gnome-desktop-thumbnail.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c
index 5645d39..f9889c1 100644
--- a/libgnome-desktop/gnome-desktop-thumbnail.c
+++ b/libgnome-desktop/gnome-desktop-thumbnail.c
@@ -1376,10 +1376,8 @@ gnome_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);
}
/**
@@ -1404,9 +1402,7 @@ gnome_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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]