* libmisc/xgetXXbyYY.c, libmisc/myname.c, libmisc/getgr_nam_gid.c,

libmisc/salt.c, libmisc/list.c, libmisc/cleanup.c, src/login.c,
	lib/getdef.h, lib/groupio.c, lib/getlong.c, lib/gshadow_.h,
	lib/sgroupio.c, lib/shadowio.c, lib/pwio.c, lib/commonio.h,
	lib/fputsx.c, lib/prototypes.h: Added splint annotations.
	* lib/groupio.c: Avoid implicit conversion of pointers to
	booleans.
	* lib/groupio.c: Free allocated buffers in case of failure.
This commit is contained in:
nekral-guest
2009-04-23 09:57:03 +00:00
parent fef6f9379a
commit 614c79defc
16 changed files with 80 additions and 64 deletions

View File

@@ -43,7 +43,7 @@
* name, and if not present it is added to a freshly allocated
* list of users.
*/
char **add_list (char **list, const char *member)
/*@only@*/ /*@out@*/char **add_list (/*@returned@*/ /*@only@*/char **list, const char *member)
{
int i;
char **tmp;
@@ -93,7 +93,7 @@ char **add_list (char **list, const char *member)
* list of users.
*/
char **del_list (char **list, const char *member)
/*@only@*/ /*@out@*/char **del_list (/*@returned@*/ /*@only@*/char **list, const char *member)
{
int i, j;
char **tmp;
@@ -141,7 +141,7 @@ char **del_list (char **list, const char *member)
return tmp;
}
char **dup_list (char *const *list)
/*@only@*/ /*@out@*/char **dup_list (char *const *list)
{
int i;
char **tmp;
@@ -182,12 +182,13 @@ bool is_on_list (char *const *list, const char *member)
* comma_to_list - convert comma-separated list to (char *) array
*/
char **comma_to_list (const char *comma)
/*@only@*/char **comma_to_list (const char *comma)
{
char *members;
char **array;
int i;
char *cp, *cp2;
const char *cp;
char *cp2;
assert (NULL != comma);