Commit a175f2eb authored by Pekka Pessi's avatar Pekka Pessi

auth_module.c: fix ssize_t check

MeeGo Coverity issue CID#7594
parent e3559e8d
......@@ -957,12 +957,12 @@ int auth_readdb_if_needed(auth_mod_t *am)
#define auth_apw_local ((void *)(intptr_t)auth_readdb_internal)
/** Read authentication database */
static
int auth_readdb_internal(auth_mod_t *am, int always)
static int auth_readdb_internal(auth_mod_t *am, int always)
{
FILE *f;
char *data, *s;
size_t len, i, n, N;
ssize_t len;
size_t i, n, N;
auth_passwd_t *apw;
if (!am->am_stat)
......@@ -1018,7 +1018,7 @@ int auth_readdb_internal(auth_mod_t *am, int always)
fclose(f);
if (len < 0)
if (len == -1)
return -1;
/* Count number of entries in new buffer */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment