* libmisc/obscure.c, lib/prototypes.h (obscure): Return a bool

instead of an int.
	* libmisc/obscure.c, libmisc/tz.c, src/passwd.c, lib/encrypt.c,
	libmisc/copydir.c, lib/prototypes.h: Add splint annotations.
	* libmisc/tz.c: Fix some const issues.
	* libmisc/tz.c: Avoid multi-statements lines.
	* libmisc/tz.c: Add brackets.
	* libmisc/copydir.c: Do not check *printf/*puts return value.
	* libmisc/copydir.c: Fail if we cannot set or reset the SELinux
	fscreate context.
	* libmisc/copydir.c: Use xmalloc instead of malloc.
	* libmisc/copydir.c: Do not check lutimes return value
	* src/vipw.c: Avoid implicit conversion of integer to boolean.
	* src/su.c (iswheel): Return a bool instead of an int.
	* src/passwd.c: Remove insert_crypt_passwd(). Use xstrdup instead.
	* src/passwd.c: Return constant strings when sufficient.
	* src/passwd.c: Do not check *printf/*puts return value.
	* src/passwd.c: Avoid implicit conversion of character to boolean.
	* src/passwd.c: Do not check sleep return value.
	* src/sulogin.c: Do not check *printf/*puts return value.
	* lib/encrypt.c: Do not check fprintf return value.
This commit is contained in:
nekral-guest
2010-08-22 12:49:07 +00:00
parent 7e398a169b
commit 471a2df3a6
10 changed files with 222 additions and 175 deletions

View File

@@ -40,7 +40,7 @@
#include "prototypes.h"
#include "defines.h"
char *pw_encrypt (const char *clear, const char *salt)
/*@exposed@*/char *pw_encrypt (const char *clear, const char *salt)
{
static char cipher[128];
char *cp;
@@ -60,7 +60,7 @@ char *pw_encrypt (const char *clear, const char *salt)
* supported, and return a DES encrypted password. */
if ((NULL != salt) && (salt[0] == '$') && (strlen (cp) <= 13))
{
const char *method;
/*@observer@*/const char *method;
switch (salt[1])
{
case '1':
@@ -79,9 +79,9 @@ char *pw_encrypt (const char *clear, const char *salt)
method = &nummethod[0];
}
}
fprintf (stderr,
_("crypt method not supported by libcrypt? (%s)\n"),
method);
(void) fprintf (stderr,
_("crypt method not supported by libcrypt? (%s)\n"),
method);
exit (EXIT_FAILURE);
}