diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-11-23 21:18:36 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-11-23 21:18:36 +0000 |
commit | 405521b51d89c9794d66f1d6cb7b2d3f02e9ae07 (patch) | |
tree | 0fe8011e5fa3b593feba988cbe9bde15eb641752 /nss/nss_files/files-XXX.c | |
parent | bd5a6cec6a7d83457cc5dcd957938c50470a6a18 (diff) | |
download | glibc-405521b51d89c9794d66f1d6cb7b2d3f02e9ae07.tar glibc-405521b51d89c9794d66f1d6cb7b2d3f02e9ae07.tar.gz glibc-405521b51d89c9794d66f1d6cb7b2d3f02e9ae07.tar.bz2 glibc-405521b51d89c9794d66f1d6cb7b2d3f02e9ae07.zip |
Update.
2004-11-23 Jakub Jelinek <jakub@redhat.com>
* nss/nss_files/files-XXX.c (internal_getent): If parse_line returned
-1, also do H_ERRNO_SET (NETDB_INTERNAL).
Diffstat (limited to 'nss/nss_files/files-XXX.c')
-rw-r--r-- | nss/nss_files/files-XXX.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c index fd000bfd9a..fb13fbe2b6 100644 --- a/nss/nss_files/files-XXX.c +++ b/nss/nss_files/files-XXX.c @@ -1,5 +1,5 @@ /* Common code for file-based databases in nss_files module. - Copyright (C) 1996,1997,1998,1999,2001,2002 Free Software Foundation, Inc. + Copyright (C) 1996-1999,2001,2002,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -213,8 +213,14 @@ internal_getent (struct STRUCTURE *result, || ! (parse_result = parse_line (p, result, data, buflen, errnop EXTRA_ARGS))); + if (__builtin_expect (parse_result == -1, 0)) + { + H_ERRNO_SET (NETDB_INTERNAL); + return NSS_STATUS_TRYAGAIN; + } + /* Filled in RESULT with the next entry from the database file. */ - return parse_result == -1 ? NSS_STATUS_TRYAGAIN : NSS_STATUS_SUCCESS; + return NSS_STATUS_SUCCESS; } |