diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2017-01-22 20:03:18 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2017-01-22 20:03:18 +0000 |
commit | 4094297a53a478f9ed7c4160ed63842a19717ba9 (patch) | |
tree | 2572eb9ecb393c87739c347111ce416813f1000f /pw/psdate.c | |
parent | 99c2ffdd3d9859176bc87b408b9f6eee7995f68f (diff) | |
download | pw-darwin-4094297a53a478f9ed7c4160ed63842a19717ba9.tar.gz pw-darwin-4094297a53a478f9ed7c4160ed63842a19717ba9.tar.zst pw-darwin-4094297a53a478f9ed7c4160ed63842a19717ba9.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.c | 6 |
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 |