summaryrefslogtreecommitdiffstats
path: root/pw/psdate.c
diff options
context:
space:
mode:
Diffstat (limited to 'pw/psdate.c')
-rw-r--r--pw/psdate.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/pw/psdate.c b/pw/psdate.c
index bd2aa15..b63d882 100644
--- a/pw/psdate.c
+++ b/pw/psdate.c
@@ -41,12 +41,8 @@ static const char rcsid[] =
static int
numerics(char const * str)
{
- int rc = isdigit((unsigned char)*str);
- if (rc)
- while (isdigit((unsigned char)*str) || *str == 'x')
- ++str;
- return rc && !*str;
+ return (str[strspn(str, "0123456789x")] == '\0');
}
static int