From 4094297a53a478f9ed7c4160ed63842a19717ba9 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Sun, 22 Jan 2017 20:03:18 +0000 Subject: 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 --- pw/psdate.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'pw/psdate.c') 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 -- cgit v1.2.3