diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2007-03-04 20:03:06 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2007-03-04 20:03:06 +0000 |
commit | 48d51b66fac883fc8648fb6b9df487382b8addc2 (patch) | |
tree | e85684c4247e33f12417a95989210df016a35109 /nss/networks.c | |
parent | 03fdef7f5c7667fd92232f6d055f98833bcfef19 (diff) |
code improvements by making type casts explicit, flagging ignored return values, renames and flagging of parameters and some miscelanious improvements (thanks to gcc warnings, splint, rats and flawfinder)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@265 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nss/networks.c')
-rw-r--r-- | nss/networks.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nss/networks.c b/nss/networks.c index 37653f3..91dfc52 100644 --- a/nss/networks.c +++ b/nss/networks.c @@ -40,7 +40,7 @@ #undef ERROR_OUT_READERROR #define ERROR_OUT_READERROR(fp) \ - fclose(fp); \ + (void)fclose(fp); \ fp=NULL; \ *errnop=ENOENT; \ *h_errnop=NO_RECOVERY; \ @@ -48,7 +48,7 @@ #undef ERROR_OUT_BUFERROR #define ERROR_OUT_BUFERROR(fp) \ - fclose(fp); \ + (void)fclose(fp); \ fp=NULL; \ *errnop=ERANGE; \ *h_errnop=TRY_AGAIN; \ @@ -60,7 +60,7 @@ #undef ERROR_OUT_NOSUCCESS #define ERROR_OUT_NOSUCCESS(fp,retv) \ - fclose(fp); \ + (void)fclose(fp); \ fp=NULL; \ *errnop=ENOENT; \ *h_errnop=HOST_NOT_FOUND; \ @@ -94,7 +94,7 @@ static enum nss_status read_netent( { /* read address and translate to host byte order */ READ_TYPE(fp,tmpint32,int32_t); - result->n_net=ntohl(tmpint32); + result->n_net=ntohl((uint32_t)tmpint32); /* signal that we've read a proper entry */ retv=NSS_STATUS_SUCCESS; /* don't return here to not upset the stream */ |