Fix bug #3652 “warning: ordered comparison of pointer…”
authorRicardo Mones <ricardo@mones.org>
Thu, 16 Jun 2016 14:28:54 +0000 (16:28 +0200)
committerRicardo Mones <ricardo@mones.org>
Thu, 16 Jun 2016 14:28:54 +0000 (16:28 +0200)
src/common/utils.c

index eb41d5cf6c2b1959b547d44f2caad5524a18e203..ca75a33ee791f614b9acb7e27349f463467f9b87 100644 (file)
@@ -4741,7 +4741,7 @@ gboolean file_is_email (const gchar *filename)
        if ((fp = g_fopen(filename, "rb")) == NULL)
                return FALSE;
        while (i < 60 && score < 3
        if ((fp = g_fopen(filename, "rb")) == NULL)
                return FALSE;
        while (i < 60 && score < 3
-              && fgets(buffer, sizeof (buffer), fp) > 0) {
+              && fgets(buffer, sizeof (buffer), fp) != NULL) {
                if (!strncmp(buffer, "From:", strlen("From:")))
                        score++;
                else if (!strncmp(buffer, "Date:", strlen("Date:")))
                if (!strncmp(buffer, "From:", strlen("From:")))
                        score++;
                else if (!strncmp(buffer, "Date:", strlen("Date:")))