OSSP CVS Repository

ossp - Check-in [1321]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1321
Date: 2001-Nov-13 15:56:05 (local)
2001-Nov-13 14:56:05 (UTC)
User:simons
Branch:
Comment: Added cast to int for isdigit() parameter to avoid compile-time warning.
Tickets:
Inspections:
Files:
ossp-pkg/var/var.c      1.8 -> 1.9     3 inserted, 3 deleted

ossp-pkg/var/var.c 1.8 -> 1.9

--- var.c        2001/11/13 14:42:57     1.8
+++ var.c        2001/11/13 14:56:05     1.9
@@ -351,7 +351,7 @@
             case '7':
             case '8':
             case '9':
-                if (end - src >= 3 && isdigit(src[1]) && isdigit(src[2])) {
+                if (end - src >= 3 && isdigit((int)src[1]) && isdigit((int)src[2])) {
                     if ((rc = expand_octal(&src, &dst, end)) != 0)
                         return rc;
                     break;
@@ -403,7 +403,7 @@
 static int number(const char *begin, const char *end)
 {
     const char *p;
-    for (p = begin; p != end && isdigit(*p); ++p);
+    for (p = begin; p != end && isdigit((int)*p); ++p);
     return p - begin;
 }
 
@@ -896,7 +896,7 @@
                 ++p;
                 continue;
             }
-            if (!isdigit(*p)) {
+            if (!isdigit((int)*p)) {
                 free_tokenbuf(expanded);
                 return VAR_UNKNOWN_QUOTED_PAIR_IN_REPLACE;
             }

CVSTrac 2.0.1