From b5c6276a6ea23cf92e30132b92cf14119235b257 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 Oct 1999 17:16:17 +0000 Subject: Update. 1999-10-08 Ulrich Drepper * nis/nss_nisplus/nisplus-parser.c (_nss_nisplus_parse_spent): Fix handling of empty entries. Patch by Thorsten Kukuk . 1999-10-08 Andreas Schwab * debug/xtrace.sh: Fix quoting bugs. Implement --help and --version. 1999-10-08 Andreas Schwab * debug/pcprofiledump.c: Fix typos. 1999-10-07 Andreas Jaeger * math/Makefile (tests): Added basic-tests. * math/basic-test.c: New file. Contains function basic_tests from libm-test. 1999-10-07 Andreas Schwab * malloc/memprof.sh: Fix quoting bugs. 1999-10-08 Ulrich Drepper * timezone/europe: Update from tzdata1999h. --- nis/nss_nisplus/nisplus-parser.c | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) (limited to 'nis/nss_nisplus/nisplus-parser.c') diff --git a/nis/nss_nisplus/nisplus-parser.c b/nis/nss_nisplus/nisplus-parser.c index e8d1079..7a91992 100644 --- a/nis/nss_nisplus/nisplus-parser.c +++ b/nis/nss_nisplus/nisplus-parser.c @@ -307,7 +307,8 @@ _nss_nisplus_parse_spent (nis_result *result, struct spwd *sp, first_unused += (len + 1); sp->sp_lstchg = sp->sp_min = sp->sp_max = sp->sp_warn = sp->sp_inact = - sp->sp_expire = sp->sp_flag = -1; + sp->sp_expire = -1; + sp->sp_flag = ~0ul; if (NISENTRYLEN (0, 7, result) > 0) { @@ -316,49 +317,56 @@ _nss_nisplus_parse_spent (nis_result *result, struct spwd *sp, line = NISENTRYVAL (0, 7, result); cp = strchr (line, ':'); if (cp == NULL) - return 0; + return 1; *cp++ = '\0'; - sp->sp_lstchg = atol (line); + if (*line) + sp->sp_lstchg = atol (line); line = cp; cp = strchr (line, ':'); if (cp == NULL) - return 0; + return 1; *cp++ = '\0'; - sp->sp_min = atol (line); + if (*line) + sp->sp_min = atol (line); line = cp; cp = strchr (line, ':'); if (cp == NULL) - return 0; + return 1; *cp++ = '\0'; - sp->sp_max = atol (line); + if (*line) + sp->sp_max = atol (line); line = cp; cp = strchr (line, ':'); if (cp == NULL) - return 0; + return 1; *cp++ = '\0'; - sp->sp_warn = atol (line); + if (*line) + sp->sp_warn = atol (line); line = cp; cp = strchr (line, ':'); if (cp == NULL) - return 0; + return 1; *cp++ = '\0'; - sp->sp_inact = atol (line); + if (*line) + sp->sp_inact = atol (line); line = cp; cp = strchr (line, ':'); if (cp == NULL) - return 0; + return 1; *cp++ = '\0'; - sp->sp_expire = atol (line); + if (*line) + sp->sp_expire = atol (line); line = cp; if (line == NULL) - return 0; - sp->sp_flag = atol (line); + return 1; + if (*line) + sp->sp_flag = atol (line); } return 1; -- cgit v1.1