Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
Ulrich Drepper committed Nov 23, 2004
1 parent bd5a6ce commit 405521b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
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).

2004-11-22 Ulrich Drepper <drepper@redhat.com>

* sysdeps/i386/fpu_control.h: Add volatile to the asms.
Expand Down
10 changes: 8 additions & 2 deletions nss/nss_files/files-XXX.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
}


Expand Down

0 comments on commit 405521b

Please sign in to comment.