From 5eceb4cf57a737c6bcd62ec2ba7c8cf9f1f7bf08 Mon Sep 17 00:00:00 2001 From: drepper Date: Mon, 8 Dec 1997 02:49:44 +0000 Subject: [PATCH] (LINE_PARSER): Call parse_line with extra argument. --- shadow/fgetspent_r.c | 6 ++++-- shadow/sgetspent_r.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/shadow/fgetspent_r.c b/shadow/fgetspent_r.c index 403eecf761..8c4638d40d 100644 --- a/shadow/fgetspent_r.c +++ b/shadow/fgetspent_r.c @@ -17,6 +17,7 @@ Boston, MA 02111-1307, USA. */ #include +#include #include #include @@ -28,7 +29,7 @@ #define EXTERN_PARSER 1 struct spent_data {}; -#include "../nss/nss_files/files-parse.c" +#include /* Read one shadow entry from the given stream. */ @@ -53,7 +54,8 @@ __fgetspent_r (FILE *stream, struct spwd *resbuf, char *buffer, size_t buflen, } while (*p == '\0' || *p == '#' || /* Ignore empty and comment lines. */ /* Parse the line. If it is invalid, loop to get the next line of the file to parse. */ - ! parse_line (buffer, (void *) resbuf, NULL, 0)); + ! parse_line (buffer, (void *) resbuf, NULL, 0, + __errno_location ())); *result = resbuf; return 0; diff --git a/shadow/sgetspent_r.c b/shadow/sgetspent_r.c index 01f0115164..f3e322aa87 100644 --- a/shadow/sgetspent_r.c +++ b/shadow/sgetspent_r.c @@ -17,6 +17,7 @@ Boston, MA 02111-1307, USA. */ #include +#include #include #include #include @@ -91,7 +92,7 @@ __sgetspent_r (const char *string, struct spwd *resbuf, char *buffer, size_t buflen, struct spwd **result) { int parse_result = parse_line (strncpy (buffer, string, buflen), - resbuf, NULL, 0); + resbuf, NULL, 0, __errno_location ()); *result = parse_result > 0 ? resbuf : NULL; return *result == NULL ? errno : 0; -- 2.11.0