OSSP CVS Repository

ossp - Difference in ossp-pkg/l2/l2_ut_level.c versions 1.2 and 1.3
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/l2/l2_ut_level.c 1.2 -> 1.3

--- l2_ut_level.c        2001/09/06 14:37:53     1.2
+++ l2_ut_level.c        2001/09/13 12:19:45     1.3
@@ -99,6 +99,13 @@
     return hv;
 }
 
+static int myishexnumber(int c)
+{
+    if (isdigit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))
+        return 1;
+    return 0;
+}
+
 l2_result_t l2_util_s2l(const char *string, size_t maxlen, int sep, unsigned int *levelmask)
 {
     const char *cpB;
@@ -127,7 +134,7 @@
             }
         }
         if (!bFound) {
-            if ((cpE > cpB+2) && strncasecmp(cpB, "0x", 2) == 0 && ishexnumber((int)(*(cpB+2)))) {
+            if ((cpE > cpB+2) && strncasecmp(cpB, "0x", 2) == 0 && myishexnumber((int)(*(cpB+2)))) {
                 *levelmask |= hexval(cpB+2, cpE);
             }
             else

CVSTrac 2.0.1