diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-12-19 12:11:38 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-12-19 12:11:38 +0000 |
commit | 2c6cfe6853a30deb4af842aacc924fa298d0521a (patch) | |
tree | 7fcc409e499bb8e3d96522f7fc2393fc10e53db2 /nis/nis_lookup.c | |
parent | 3ccb96cd41b38d0159bdf8aad229c3599864c65d (diff) | |
download | glibc-2c6cfe6853a30deb4af842aacc924fa298d0521a.tar glibc-2c6cfe6853a30deb4af842aacc924fa298d0521a.tar.gz glibc-2c6cfe6853a30deb4af842aacc924fa298d0521a.tar.bz2 glibc-2c6cfe6853a30deb4af842aacc924fa298d0521a.zip |
Updated to fedora-glibc-20051219T1003cvs/fedora-glibc-2_3_90-19
Diffstat (limited to 'nis/nis_lookup.c')
-rw-r--r-- | nis/nis_lookup.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/nis/nis_lookup.c b/nis/nis_lookup.c index 0b97e67a61..4cb34dd1a8 100644 --- a/nis/nis_lookup.c +++ b/nis/nis_lookup.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@uni-paderborn.de>, 1997. @@ -81,7 +81,6 @@ nis_lookup (const_nis_name name, const unsigned int flags) { if (__nisbind_next (&bptr) != NIS_SUCCESS) { - __nisbind_destroy (&bptr); nis_free_directory (dir); NIS_RES_STATUS (res) = NIS_NAMEUNREACHABLE; return res; @@ -90,7 +89,7 @@ nis_lookup (const_nis_name name, const unsigned int flags) do { - static struct timeval RPCTIMEOUT = {10, 0}; + static const struct timeval RPCTIMEOUT = {10, 0}; enum clnt_stat result; again: @@ -107,8 +106,8 @@ nis_lookup (const_nis_name name, const unsigned int flags) if (NIS_RES_STATUS (res) == NIS_SUCCESS) { - if (__type_of(NIS_RES_OBJECT (res)) == NIS_LINK_OBJ && - flags & FOLLOW_LINKS) /* We are following links */ + if (__type_of(NIS_RES_OBJECT (res)) == NIS_LINK_OBJ + && (flags & FOLLOW_LINKS)) /* We are following links */ { if (count_links) free (req.ns_name); @@ -137,16 +136,17 @@ nis_lookup (const_nis_name name, const unsigned int flags) } } else - if ((NIS_RES_STATUS (res) == NIS_SYSTEMERROR) || - (NIS_RES_STATUS (res) == NIS_NOSUCHNAME) || - (NIS_RES_STATUS (res) == NIS_NOT_ME)) + if (NIS_RES_STATUS (res) == NIS_SYSTEMERROR + || NIS_RES_STATUS (res) == NIS_NOSUCHNAME + || NIS_RES_STATUS (res) == NIS_NOT_ME) { if (link_first_try) { __nisbind_destroy (&bptr); nis_free_directory (dir); - if (__nisfind_server (req.ns_name, &dir) != NIS_SUCCESS) + if (__nisfind_server (req.ns_name, &dir) + != NIS_SUCCESS) return res; if (__nisbind_create (&bptr, @@ -166,7 +166,6 @@ nis_lookup (const_nis_name name, const unsigned int flags) { if (__nisbind_next (&bptr) != NIS_SUCCESS) { - __nisbind_destroy (&bptr); nis_free_directory (dir); return res; } |