File xfdesktop-compiler-warning.diff of Package xfce4-desktop

From: Bernhard Walle <bwalle@suse.de>
Subject: [PATCH] Fix compiler warning
References: bnc#433391

Fix warning:

----------------------------- 8< ---------------------------------
xfdesktop-common.c:54: \
    warning: ordered comparison of pointer with integer zero
----------------------------- >8 ---------------------------------

Signed-off-by: Bernhard Walle <bwalle@suse.de>

---
 common/xfdesktop-common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/common/xfdesktop-common.c
+++ b/common/xfdesktop-common.c
@@ -51,7 +51,7 @@ is_backdrop_list(const gchar *path)
     if(!(fp = fopen (path, "r")))
         return FALSE;
     
-    if(fgets(buf, size, fp) > 0 && !strncmp(LIST_TEXT, buf, size - 1))
+    if(fgets(buf, size, fp) != NULL && !strncmp(LIST_TEXT, buf, size - 1))
         is_list = TRUE;
     fclose(fp);
     
openSUSE Build Service is sponsored by