From cb8bbc06de0baf2dff4a703e6d2bb47bdf90d896 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 7 Oct 2011 18:07:24 -0700 Subject: define(): Avoid assigning constant string to non-const char * Signed-off-by: Alan Coopersmith --- parse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parse.c b/parse.c index d14cbf8..c7aad8c 100644 --- a/parse.c +++ b/parse.c @@ -412,8 +412,9 @@ define(char *def, struct inclist *file) val++; if (!*val) - val = "1"; - define2(def, val, file); + define2(def, "1", file); + else + define2(def, val, file); } struct symtab ** -- cgit v1.2.3