* libmisc/chkname.c: Use a bool when possible instead of integers.

* libmisc/chkname.c: Add brackets and parenthesis.
This commit is contained in:
nekral-guest 2008-12-23 22:42:22 +00:00
parent 4c7d798307
commit 2bb7007fcb
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-12-23 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/chkname.c: Use a bool when possible instead of integers.
* libmisc/chkname.c: Add brackets and parenthesis.
2008-12-23 Nicolas François <nicolas.francois@centraliens.net> 2008-12-23 Nicolas François <nicolas.francois@centraliens.net>
* man/groupadd.8.xml, configure.in, man/config.xml.in: Use the * man/groupadd.8.xml, configure.in, man/config.xml.in: Use the

View File

@ -100,8 +100,10 @@ bool is_valid_group_name (const char *name)
* Arbitrary limit for group names. * Arbitrary limit for group names.
* HP-UX 10 limits to 16 characters * 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 false;
}
return is_valid_name (name); return is_valid_name (name);
} }