From 172196d16a58f9fef6d4c89c067f076e6cbe9185 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Wed, 1 Oct 2014 09:31:12 +0400 Subject: [PATCH] (edit_read_syntax_rules): fix pointer tests. Signed-off-by: Andrew Borodin --- src/editor/syntax.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/editor/syntax.c b/src/editor/syntax.c index e8ee3d748..7c9d0fcbc 100644 --- a/src/editor/syntax.c +++ b/src/editor/syntax.c @@ -8,7 +8,7 @@ Paul Sheer, 1998 Egmont Koblinger , 2010 Slava Zanko , 2013 - Andrew Borodin , 2013 + Andrew Borodin , 2013, 2014 This file is part of the Midnight Commander. @@ -1046,13 +1046,13 @@ edit_read_syntax_rules (WEdit * edit, FILE * f, char **args, int args_size) c->keyword[0] = g_malloc0 (sizeof (struct key_word)); subst_defines (edit->defines, a, &args[1024]); fg = *a; - if (*a != '\0') + if (*a != NULL) a++; bg = *a; - if (*a != '\0') + if (*a != NULL) a++; attrs = *a; - if (*a != '\0') + if (*a != NULL) a++; g_strlcpy (last_fg, fg != NULL ? fg : "", sizeof (last_fg)); g_strlcpy (last_bg, bg != NULL ? bg : "", sizeof (last_bg)); @@ -1119,13 +1119,13 @@ edit_read_syntax_rules (WEdit * edit, FILE * f, char **args, int args_size) k->first = *k->keyword; subst_defines (edit->defines, a, &args[1024]); fg = *a; - if (*a != '\0') + if (*a != NULL) a++; bg = *a; - if (*a != '\0') + if (*a != NULL) a++; attrs = *a; - if (*a != '\0') + if (*a != NULL) a++; if (fg == NULL) fg = last_fg;