This has no functional impact, but just makes the code simpler to read and less
error prone.
#include <common/memory.h>
#include <common/types.h>
#include <common/utils.h>
+#include <ctype.h>
/* return true if *s points to &[A-Za-z]+; (e.g. Ç )
* or &#[0-9]*; (e.g. & )
s++;
if (*s == 'x' || *s == 'X') {
s++;
- while ((*s >= '0' && *s <= '9')
- || (*s >= 'a' && *s <= 'f')
- || (*s >= 'A' && *s <= 'F'))
+ while (isxdigit(*s))
s++;
} else {
- while (*s >= '0' && *s <= '9')
+ while (isdigit(*s))
s++;
}
} else {