summaryrefslogtreecommitdiffstats
path: root/pw/psdate.c
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2017-01-22 20:03:18 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2017-01-22 20:03:18 +0000
commite18f3da5e35c62cbf864d1717e6ae25bb6014dba (patch)
treee5e7fc139b4d4232f3befcd932c4026a9324f619 /pw/psdate.c
parentf856c3ca12b9891190c15f332513b70a0a2044b5 (diff)
downloadpw-darwin-e18f3da5e35c62cbf864d1717e6ae25bb6014dba.tar.gz
pw-darwin-e18f3da5e35c62cbf864d1717e6ae25bb6014dba.tar.zst
pw-darwin-e18f3da5e35c62cbf864d1717e6ae25bb6014dba.zip
Really restore the old behaviour for pw usermod -m
It again reinstall missing skel files without overwriting changed one Add a regression test about it Reported by: ae MFC after: 3 days
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