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); }