diff options
Diffstat (limited to 'soltools')
-rw-r--r-- | soltools/cpp/_eval.c | 12 | ||||
-rw-r--r-- | soltools/cpp/_lex.c | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/soltools/cpp/_eval.c b/soltools/cpp/_eval.c index c33ef690d1c9..189a15b29562 100644 --- a/soltools/cpp/_eval.c +++ b/soltools/cpp/_eval.c @@ -1,6 +1,8 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + #include <stdlib.h> #include <string.h> + #include "cpp.h" #define NSTAK 32 @@ -713,11 +715,11 @@ struct value } else { - static char cvcon[] - = "b\bf\fn\nr\rt\tv\v''\"\"??\\\\"; - size_t j; + static char cvcon[] = "b\bf\fn\nr\rt\tv\v''\"\"??\\\\"; + static size_t cvlen = sizeof(cvcon) - 1; - for (j = 0; j < sizeof(cvcon); j += 2) + size_t j; + for (j = 0; j < cvlen; j += 2) { if (*p == cvcon[j]) { @@ -726,7 +728,7 @@ struct value } } p += 1; - if (j >= sizeof(cvcon)) + if (j >= cvlen) error(WARNING, "Undefined escape in character constant"); } diff --git a/soltools/cpp/_lex.c b/soltools/cpp/_lex.c index 7e7bf2e80721..32f8cdfcadf6 100644 --- a/soltools/cpp/_lex.c +++ b/soltools/cpp/_lex.c @@ -263,7 +263,7 @@ void bigfsm[j][fp->state] = (short) nstate; continue; case C_ALPH: - for (j = 0; j <= 256; j++) + for (j = 0; j < 256; j++) #ifdef S390 if( isalpha( j ) || (j == '_') ) #else |