Fix a potential macro expansion problem... isspace can be
authorEric Andersen <andersen@codepoet.org>
Sat, 15 Jun 2002 14:37:46 +0000 (14:37 -0000)
committerEric Andersen <andersen@codepoet.org>
Sat, 15 Jun 2002 14:37:46 +0000 (14:37 -0000)
a macro causing a double decrement...

coreutils/cal.c

index f6578bf430cad8f9929bbbba8522989572efe246..3ccd3fff57af74c66e1051e12344b44a2abf784c 100644 (file)
@@ -372,7 +372,7 @@ void trim_trailing_spaces(char *s)
 
        for (p = s; *p; ++p)
                continue;
-       while (p > s && isspace(*--p))
+       while (p > s && (--p, isspace(*p)))
                continue;
        if (p > s)
                ++p;