summaryrefslogtreecommitdiff
path: root/rsc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-22 21:55:48 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-22 21:55:48 +0100
commitcb643b44ca9469b9bbea97c5c0c0c911fc8ba058 (patch)
tree3281d822a9571f23cc7d776aeaa9862d35050833 /rsc
parent971be75c58889b03bf69b31d3721081c39d53a35 (diff)
Fix passing plain char into ctype.h is* functions
Change-Id: Ifa1098a12a9d3d28a4d272ac8f4ab72d9a92282b
Diffstat (limited to 'rsc')
-rw-r--r--rsc/source/rscpp/cpp2.c2
-rw-r--r--rsc/source/rscpp/cpp3.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c
index 2cbc90d9d439..e55dc384018f 100644
--- a/rsc/source/rscpp/cpp2.c
+++ b/rsc/source/rscpp/cpp2.c
@@ -166,7 +166,7 @@ int control(int counter)
* We subtract 1 as we want the number of the next line.
*/
line = atoi(work) - 1; /* Reset line number */
- for (tp = work; isdigit(*tp) || type[(int)*tp] == SPA; tp++)
+ for (tp = work; isdigit((unsigned char)*tp) || type[(int)*tp] == SPA; tp++)
; /* Skip over digits */
if (*tp != EOS) /* Got a filename, so: */
{
diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c
index bd2e2cc262d2..078be477d815 100644
--- a/rsc/source/rscpp/cpp3.c
+++ b/rsc/source/rscpp/cpp3.c
@@ -174,7 +174,7 @@ int dooptions(int argc, char** argv)
else
{
c = *ap++; /* Option byte */
- if (islower(c)) /* Normalize case */
+ if (islower((unsigned char)c)) /* Normalize case */
c = toupper(c);
switch (c) /* Command character */
{
@@ -224,13 +224,13 @@ int dooptions(int argc, char** argv)
}
while (sizp->bits != endtest && *ap != EOS)
{
- if (!isdigit(*ap)) /* Skip to next digit */
+ if (!isdigit((unsigned char)*ap)) /* Skip to next digit */
{
ap++;
continue;
}
size = 0; /* Compile the value */
- while (isdigit(*ap))
+ while (isdigit((unsigned char)*ap))
{
size *= 10;
size += (*ap++ - '0');
@@ -254,7 +254,7 @@ int dooptions(int argc, char** argv)
#if OSL_DEBUG_LEVEL > 1
case 'X': /* Debug */
- debug = (isdigit(*ap)) ? atoi(ap) : 1;
+ debug = (isdigit((unsigned char)*ap)) ? atoi(ap) : 1;
#if (HOST == SYS_UNIX)
signal(SIGINT, (void (*)(int)) abort); /* Trap "interrupt" */
#endif