]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - nis/nis_lookup.c
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / nis / nis_lookup.c
index 9677b4d3d1c7b5a36a909bb67dfa1380cffd0bf1..7f8226c9e7069315f72bb1540b9156f2a90c1a71 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (C) 1997-1999, 2004, 2005, 2006, 2007
-   Free Software Foundation, Inc.
+/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@uni-paderborn.de>, 1997.
 
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
 
 #include <string.h>
 #include <rpcsvc/nis.h>
 #include "nis_xdr.h"
 #include "nis_intern.h"
 #include <libnsl.h>
+#include <shlib-compat.h>
 
 
 nis_result *
@@ -65,7 +64,7 @@ nis_lookup (const_nis_name name, const unsigned int flags)
       req.ns_object.ns_object_val = NULL;
 
       status = __prepare_niscall (req.ns_name, &dir, &bptr, flags);
-      if (__builtin_expect (status != NIS_SUCCESS, 0))
+      if (__glibc_unlikely (status != NIS_SUCCESS))
        {
          NIS_RES_STATUS (res) = status;
          goto out;
@@ -149,7 +148,7 @@ nis_lookup (const_nis_name name, const unsigned int flags)
                          dir = NULL;
                          status = __prepare_niscall (req.ns_name, &dir,
                                                      &bptr, flags);
-                         if (__builtin_expect (status != NIS_SUCCESS, 0))
+                         if (__glibc_unlikely (status != NIS_SUCCESS))
                            {
                              NIS_RES_STATUS (res) = status;
                              goto out;
@@ -217,4 +216,4 @@ nis_lookup (const_nis_name name, const unsigned int flags)
 
   return res;
 }
-libnsl_hidden_def (nis_lookup)
+libnsl_hidden_nolink_def (nis_lookup, GLIBC_2_1)