about summary refs log tree commit diff
path: root/nss/nss_files
diff options
context:
space:
mode:
Diffstat (limited to 'nss/nss_files')
-rw-r--r--nss/nss_files/files-XXX.c2
-rw-r--r--nss/nss_files/files-alias.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c
index c741ab6f48..014e2729a4 100644
--- a/nss/nss_files/files-XXX.c
+++ b/nss/nss_files/files-XXX.c
@@ -201,7 +201,7 @@ CONCAT(_nss_files_get,ENTNAME_r) (struct STRUCTURE *result,
   if (stream == NULL)
     status = internal_setent (0);
 
-  if (status != NSS_STATUS_SUCCESS)
+  if (status == NSS_STATUS_SUCCESS)
     {
       /* If the last use was not by the getent function we need the
 	 position the stream.  */
diff --git a/nss/nss_files/files-alias.c b/nss/nss_files/files-alias.c
index c6ef49c621..2b0f292d66 100644
--- a/nss/nss_files/files-alias.c
+++ b/nss/nss_files/files-alias.c
@@ -20,6 +20,7 @@
 
 #include <aliases.h>
 #include <ctype.h>
+#include <errno.h>
 #include <libc-lock.h>
 #include <stdlib.h>
 #include <stdio.h>