* libmisc/obscure.c: Change some int to size_t.

This commit is contained in:
nekral-guest 2009-04-24 23:04:27 +00:00
parent 5e45ac1688
commit 01e88bda16
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2009-04-25 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/obscure.c: Change some int to size_t.
2009-04-25 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/console.c: Use a less disturbing construct for splint.

View File

@ -52,7 +52,7 @@
*/
static bool palindrome (unused const char *old, const char *new)
{
int i, j;
size_t i, j;
i = strlen (new);
@ -223,7 +223,7 @@ static const char *password_check (const char *old, const char *new,
static const char *obscure_msg (const char *old, const char *new,
const struct passwd *pwdp)
{
int maxlen, oldlen, newlen;
size_t maxlen, oldlen, newlen;
char *new1, *old1;
const char *msg;
char *result;
@ -231,7 +231,7 @@ static const char *obscure_msg (const char *old, const char *new,
oldlen = strlen (old);
newlen = strlen (new);
if (newlen < getdef_num ("PASS_MIN_LEN", 0)) {
if (newlen < (size_t) getdef_num ("PASS_MIN_LEN", 0)) {
return _("too short");
}
@ -271,7 +271,7 @@ static const char *obscure_msg (const char *old, const char *new,
}
}
maxlen = getdef_num ("PASS_MAX_LEN", 8);
maxlen = (size_t) getdef_num ("PASS_MAX_LEN", 8);
if ( (oldlen <= maxlen)
&& (newlen <= maxlen)) {
return NULL;