diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-04-08 20:28:00 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-04-08 20:28:00 +0000 |
commit | 7960f2a7040874c63196657fa25d6ddda778cc67 (patch) | |
tree | 7acbee73ed0428e433ee26dfd78ca5d6aa1512ee /nis | |
parent | 0a21e40021389dd9beccafae597fd931e355f7cd (diff) | |
download | glibc-7960f2a7040874c63196657fa25d6ddda778cc67.zip glibc-7960f2a7040874c63196657fa25d6ddda778cc67.tar.gz glibc-7960f2a7040874c63196657fa25d6ddda778cc67.tar.bz2 |
* nis/nis_ping.c: Remove unnecessary conditionals before
nis_freeresult calls.
* nis/nis_ismember.c: Likewise.
Diffstat (limited to 'nis')
-rw-r--r-- | nis/nis_ismember.c | 5 | ||||
-rw-r--r-- | nis/nis_ping.c | 11 |
2 files changed, 6 insertions, 10 deletions
diff --git a/nis/nis_ismember.c b/nis/nis_ismember.c index f3f9bc9..178b489 100644 --- a/nis/nis_ismember.c +++ b/nis/nis_ismember.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 1999, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997. @@ -47,8 +47,7 @@ internal_ismember (const_nis_name principal, const_nis_name group) res = nis_lookup (buf, EXPAND_NAME|FOLLOW_LINKS); if (res == NULL || NIS_RES_STATUS (res) != NIS_SUCCESS) { - if (res) - nis_freeresult (res); + nis_freeresult (res); return 0; } diff --git a/nis/nis_ping.c b/nis/nis_ping.c index d9924f9..81afc5e 100644 --- a/nis/nis_ping.c +++ b/nis/nis_ping.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 1999, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997. @@ -39,8 +39,7 @@ nis_ping (const_nis_name dirname, unsigned int utime, res = nis_lookup (dirname, MASTER_ONLY); if (res == NULL || NIS_RES_STATUS (res) != NIS_SUCCESS) { - if (res) - nis_freeresult (res); + nis_freeresult (res); return; } obj = res->objects.objects_val; @@ -51,8 +50,7 @@ nis_ping (const_nis_name dirname, unsigned int utime, /* Check if obj is really a diryectory object */ if (__type_of (obj) != NIS_DIRECTORY_OBJ) { - if (res != NULL) - nis_freeresult (res); + nis_freeresult (res); return; } @@ -68,6 +66,5 @@ nis_ping (const_nis_name dirname, unsigned int utime, NIS_PING, (xdrproc_t) _xdr_ping_args, (caddr_t) &args, (xdrproc_t) xdr_void, (caddr_t) NULL, 0, NULL); - if (res) - nis_freeresult (res); + nis_freeresult (res); } |