From f19f67c39cecf71c1a9280cba25bd28feebb6156 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Sat, 20 Mar 2010 10:19:50 +0000 Subject: [PATCH] * libmisc/strtoday.c: Empty dates indicate a disabled date, this is not an error. --- ChangeLog | 5 +++++ libmisc/strtoday.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8b2fdb79..2a19aa49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-20 Nicolas François + + * libmisc/strtoday.c: Empty dates indicate a disabled date, this is + not an error. + 2010-03-19 Nicolas François * src/useradd.c, lib/commonio.c, po/POTFILES.in: Fix typos. diff --git a/libmisc/strtoday.c b/libmisc/strtoday.c index fe40e00a..57648984 100644 --- a/libmisc/strtoday.c +++ b/libmisc/strtoday.c @@ -75,7 +75,7 @@ long strtoday (const char *str) * (useradd sets sp_expire = current date for new lusers) */ if ((NULL == str) || ('\0' == *str)) { - return -2; + return -1; } /* If a numerical value is provided, this is already a number of