Use a new isSpace() inline function to call isspace() safely
[rsync.git] / popt / poptint.h
index 5e75712c95693569a1f67f9b1f2dbc50070c410f..bec7c976943208aaa6cabdad0d2e9ff72a534859 100644 (file)
@@ -22,6 +22,12 @@ _free(/*@only@*/ /*@null@*/ const void * p)
     return NULL;
 }
 
+static inline int
+isSpace(const char *ptr)
+{
+    return isspace(*(unsigned char *)ptr);
+}
+
 /* Bit mask macros. */
 /*@-exporttype -redef @*/
 typedef        unsigned int __pbm_bits;