scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit c1c6db84269708d87a5b8d0e78225768c36b36ed
parent 56114f333a1bf506d457033591b0101f3dc958b4
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed, 20 May 2015 12:43:51 +0200

Remove non needed variable in parseargs()

This variable had the same meaning and use than the parameter, so it is
better to use the parameter.

Diffstat:
Mcc1/cpp.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cc1/cpp.c b/cc1/cpp.c @@ -21,7 +21,7 @@ parseargs(char *s, char *args[NR_MACROARG], int *nargs) { unsigned n ; size_t len; - char **bp, *endp, c; + char *endp, c; if (*s != '(') { *nargs = -1; @@ -33,7 +33,7 @@ parseargs(char *s, char *args[NR_MACROARG], int *nargs) } - for (bp = args, n = 1; n <= NR_MACROARG; ++bp, ++n) { + for (n = 1; n <= NR_MACROARG; ++n) { while (isspace(*s)) ++s; if (!isalnum(*s) && *s != '_') @@ -42,7 +42,7 @@ parseargs(char *s, char *args[NR_MACROARG], int *nargs) /* nothing */; if ((len = endp - s) > IDENTSIZ) error("macro argument too long"); - *bp = s; + *args++ = s; for (s = endp; isspace(*s); ++s) *s = '\0'; c = *s;