* nss/getXXent_r.c (ENDFUNC_NAME): Don't do anything if the
	service hasn't been used [PR libc/4744].
This commit is contained in:
Ulrich Drepper 2002-11-04 10:20:14 +00:00
parent 125183201f
commit 226e9fda25
3 changed files with 16 additions and 6 deletions

View File

@ -1,5 +1,8 @@
2002-11-04 Ulrich Drepper <drepper@redhat.com> 2002-11-04 Ulrich Drepper <drepper@redhat.com>
* nss/getXXent_r.c (ENDFUNC_NAME): Don't do anything if the
service hasn't been used [PR libc/4744].
* include/features.h: Use __STDC_VERSION__ not __STDC_VERSION. * include/features.h: Use __STDC_VERSION__ not __STDC_VERSION.
Reported by Miloslav Trmac <mitr@volny.cz> [PR libc/4766]. Reported by Miloslav Trmac <mitr@volny.cz> [PR libc/4766].

View File

@ -1,5 +1,8 @@
2002-11-04 Ulrich Drepper <drepper@redhat.com> 2002-11-04 Ulrich Drepper <drepper@redhat.com>
* sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
-fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
* sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
register number. register number.
(DO_SET_THREAD_AREA): Mark asm output specifiers correctly. (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.

View File

@ -137,6 +137,9 @@ ENDFUNC_NAME (void)
{ {
int save; int save;
/* If the service has not been used before do not do anything. */
if (startp != NULL)
{
__libc_lock_lock (lock); __libc_lock_lock (lock);
__nss_endent (ENDFUNC_NAME_STRING, DB_LOOKUP_FCT, &nip, &startp, __nss_endent (ENDFUNC_NAME_STRING, DB_LOOKUP_FCT, &nip, &startp,
&last_nip, NEED__RES); &last_nip, NEED__RES);
@ -144,6 +147,7 @@ ENDFUNC_NAME (void)
__libc_lock_unlock (lock); __libc_lock_unlock (lock);
__set_errno (save); __set_errno (save);
} }
}
int int