Use a new isSpace() inline function to call isspace() safely
[rsync/rsync.git] / popt / poptint.h
index 5e75712..bec7c97 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;