From 873ca5046137917ddb6fae7f6cf097d91612d4d6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 29 May 2011 22:26:43 -0400 Subject: Interpret numeric values in shadow file as signed --- shadow/sgetspent_r.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'shadow') diff --git a/shadow/sgetspent_r.c b/shadow/sgetspent_r.c index 5599ee4..5db4aec 100644 --- a/shadow/sgetspent_r.c +++ b/shadow/sgetspent_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 2005, 2009 Free Software Foundation, Inc. +/* Copyright (C) 1996-1998, 2005, 2009, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -52,11 +52,11 @@ LINE_PARSER else { STRING_FIELD (result->sp_pwdp, ISCOLON, 0); - INT_FIELD_MAYBE_NULL (result->sp_lstchg, ISCOLON, 0, 10, (long int), + INT_FIELD_MAYBE_NULL (result->sp_lstchg, ISCOLON, 0, 10, (long int) (int), (long int) -1); - INT_FIELD_MAYBE_NULL (result->sp_min, ISCOLON, 0, 10, (long int), + INT_FIELD_MAYBE_NULL (result->sp_min, ISCOLON, 0, 10, (long int) (int), (long int) -1); - INT_FIELD_MAYBE_NULL (result->sp_max, ISCOLON, 0, 10, (long int), + INT_FIELD_MAYBE_NULL (result->sp_max, ISCOLON, 0, 10, (long int) (int), (long int) -1); while (isspace (*line)) ++line; @@ -70,12 +70,12 @@ LINE_PARSER } else { - INT_FIELD_MAYBE_NULL (result->sp_warn, ISCOLON, 0, 10, (long int), - (long int) -1); - INT_FIELD_MAYBE_NULL (result->sp_inact, ISCOLON, 0, 10, (long int), - (long int) -1); - INT_FIELD_MAYBE_NULL (result->sp_expire, ISCOLON, 0, 10, (long int), - (long int) -1); + INT_FIELD_MAYBE_NULL (result->sp_warn, ISCOLON, 0, 10, + (long int) (int), (long int) -1); + INT_FIELD_MAYBE_NULL (result->sp_inact, ISCOLON, 0, 10, + (long int) (int), (long int) -1); + INT_FIELD_MAYBE_NULL (result->sp_expire, ISCOLON, 0, 10, + (long int) (int), (long int) -1); if (*line != '\0') INT_FIELD_MAYBE_NULL (result->sp_flag, FALSEP, 0, 10, (unsigned long int), ~0ul) -- cgit v1.1