This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] nis/nss_nisplus: Kill warnings
- From: Marek Polacek <mpolacek at redhat dot com>
- To: libc-alpha <libc-alpha at sourceware dot org>
- Date: Wed, 06 Jul 2011 18:19:22 +0200
- Subject: [PATCH] nis/nss_nisplus: Kill warnings
Even though we, in those two cases, set the `status' variable, we still always
return NSS_STATUS_SUCCESS, which is IMHO wrong. Thus fixed.
2011-07-06 Marek Polacek <mpolacek@redhat.com>
* nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_setspent): Honour the
`status' variable.
* nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_setetherent):
Likewise.
--- libc/nis/nss_nisplus/nisplus-spwd.c.mp 2011-07-06 16:50:38.700577426 +0200
+++ libc/nis/nss_nisplus/nisplus-spwd.c 2011-07-06 18:15:23.107452500 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001, 2002, 2003, 2005, 2007
+/* Copyright (C) 1997, 2001, 2002, 2003, 2005, 2007, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
@@ -57,7 +57,7 @@ _nss_nisplus_setspent (int stayopen)
__libc_lock_unlock (lock);
- return NSS_STATUS_SUCCESS;
+ return status;
}
enum nss_status
--- libc/nis/nss_nisplus/nisplus-ethers.c.mp 2011-07-06 16:45:31.340574921 +0200
+++ libc/nis/nss_nisplus/nisplus-ethers.c 2011-07-06 18:15:10.431452205 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997,1998,2000-2003,2005,2006,2007
+/* Copyright (C) 1997,1998,2000-2003,2005,2006,2007,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
@@ -136,7 +136,7 @@ _nss_nisplus_setetherent (int stayopen)
__libc_lock_unlock (lock);
- return NSS_STATUS_SUCCESS;
+ return status;
}
enum nss_status