projects
/
kopensolaris-gnu
/
glibc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(nss_lookup_function): Inclide function.def, not functions.def.
[kopensolaris-gnu/glibc.git]
/
nss
/
getXXent_r.c
diff --git
a/nss/getXXent_r.c
b/nss/getXXent_r.c
index
cc47537
..
f2cca25
100644
(file)
--- a/
nss/getXXent_r.c
+++ b/
nss/getXXent_r.c
@@
-17,7
+17,7
@@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <libc-lock.h>
+#include <
bits/
libc-lock.h>
#include "nsswitch.h"
#include "nsswitch.h"
@@
-124,9
+124,9
@@
setup (void **fctp, const char *func_name, int all)
if (startp == NULL)
{
no_more = DB_LOOKUP_FCT (&nip, func_name, fctp);
if (startp == NULL)
{
no_more = DB_LOOKUP_FCT (&nip, func_name, fctp);
- startp = no_more ? (service_user *) -1 : nip;
+ startp = no_more ? (service_user *) -1
l
: nip;
}
}
- else if (startp == (service_user *) -1)
+ else if (startp == (service_user *) -1
l
)
/* No services at all. */
return 1;
else
/* No services at all. */
return 1;
else
@@
-150,7
+150,7
@@
SETFUNC_NAME (STAYOPEN)
if ((_res.options & RES_INIT) == 0 && res_init () == -1)
{
__set_h_errno (NETDB_INTERNAL);
if ((_res.options & RES_INIT) == 0 && res_init () == -1)
{
__set_h_errno (NETDB_INTERNAL);
- return
NULL
;
+ return;
}
#endif /* need _res */
}
#endif /* need _res */
@@
-188,7
+188,7
@@
ENDFUNC_NAME (void)
if ((_res.options & RES_INIT) == 0 && res_init () == -1)
{
__set_h_errno (NETDB_INTERNAL);
if ((_res.options & RES_INIT) == 0 && res_init () == -1)
{
__set_h_errno (NETDB_INTERNAL);
- return
NULL
;
+ return;
}
#endif /* need _res */
}
#endif /* need _res */
@@
-225,7
+225,8
@@
INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen,
if ((_res.options & RES_INIT) == 0 && res_init () == -1)
{
__set_h_errno (NETDB_INTERNAL);
if ((_res.options & RES_INIT) == 0 && res_init () == -1)
{
__set_h_errno (NETDB_INTERNAL);
- return NULL;
+ *result = NULL;
+ return -1;
}
#endif /* need _res */
}
#endif /* need _res */
@@
-262,13
+263,15
@@
INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen,
if (! no_more)
status = (*sfct) (STAYOPEN_TMPVAR);
if (! no_more)
status = (*sfct) (STAYOPEN_TMPVAR);
+ else
+ status = NSS_STATUS_NOTFOUND;
}
while (! no_more && status != NSS_STATUS_SUCCESS);
}
__libc_lock_unlock (lock);
}
while (! no_more && status != NSS_STATUS_SUCCESS);
}
__libc_lock_unlock (lock);
- *result = NSS_STATUS_SUCCESS ? resbuf : NULL;
+ *result =
status ==
NSS_STATUS_SUCCESS ? resbuf : NULL;
return status == NSS_STATUS_SUCCESS ? 0 : -1;
}
#define do_weak_alias(n1, n2) weak_alias (n1, n2)
return status == NSS_STATUS_SUCCESS ? 0 : -1;
}
#define do_weak_alias(n1, n2) weak_alias (n1, n2)