From: nekral-guest Date: Tue, 23 Dec 2008 22:42:22 +0000 (+0000) Subject: * libmisc/chkname.c: Use a bool when possible instead of integers. X-Git-Tag: 4.1.3~125 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2bb7007fcbfe22e9431d2a1069b924d8c582b41b;p=shadow * libmisc/chkname.c: Use a bool when possible instead of integers. * libmisc/chkname.c: Add brackets and parenthesis. --- diff --git a/ChangeLog b/ChangeLog index 73c43254..31dfd3ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-23 Nicolas François + + * libmisc/chkname.c: Use a bool when possible instead of integers. + * libmisc/chkname.c: Add brackets and parenthesis. + 2008-12-23 Nicolas François * man/groupadd.8.xml, configure.in, man/config.xml.in: Use the diff --git a/libmisc/chkname.c b/libmisc/chkname.c index 5e400966..67c4e3eb 100644 --- a/libmisc/chkname.c +++ b/libmisc/chkname.c @@ -100,8 +100,10 @@ bool is_valid_group_name (const char *name) * Arbitrary limit for group names. * HP-UX 10 limits to 16 characters */ - if (GROUP_NAME_MAX_LENGTH && strlen (name) > GROUP_NAME_MAX_LENGTH) + if ( (GROUP_NAME_MAX_LENGTH > 0) + && (strlen (name) > GROUP_NAME_MAX_LENGTH)) { return false; + } return is_valid_name (name); }