]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - nis/nis_ismember.c
Include shlib-compat.h in many sunrpc/nis source files.
[thirdparty/glibc.git] / nis / nis_ismember.c
index 7580ee8c8e27336c536a1ab16ec35fac9c4fc122..5aba3367f58692274140d96e805b1bdc6655c203 100644 (file)
@@ -1,24 +1,24 @@
-/* Copyright (c) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (c) 1997-2017 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public License as
-   published by the Free Software Foundation; either version 2 of the
-   License, or (at your option) any later version.
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU Library General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA. */
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #include <string.h>
 #include <rpcsvc/nis.h>
+#include <shlib-compat.h>
 
 /* internal_nis_ismember ()
    return codes: -1 principal is in -group
@@ -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;
     }
 
@@ -148,3 +147,4 @@ nis_ismember (const_nis_name principal, const_nis_name group)
   else
     return FALSE;
 }
+libnsl_hidden_nolink_def (nis_ismember, GLIBC_2_1)