summaryrefslogtreecommitdiff
path: root/nss/nss_files/files-parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/nss_files/files-parse.c')
-rw-r--r--nss/nss_files/files-parse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nss/nss_files/files-parse.c b/nss/nss_files/files-parse.c
index 83a80f35c0..2e84d762f0 100644
--- a/nss/nss_files/files-parse.c
+++ b/nss/nss_files/files-parse.c
@@ -69,7 +69,7 @@ struct parser_data
/* The parser is defined in a different module. */
extern int parse_line (char *line, struct STRUCTURE *result,
- struct parser_data *data, int datalen);
+ struct parser_data *data, size_t datalen);
# define LINE_PARSER(EOLSET, BODY) /* Do nothing */
@@ -80,7 +80,7 @@ extern int parse_line (char *line, struct STRUCTURE *result,
# define LINE_PARSER(EOLSET, BODY) \
parser_stclass int \
parse_line (char *line, struct STRUCTURE *result, \
- struct parser_data *data, int datalen) \
+ struct parser_data *data, size_t datalen) \
{ \
ENTDATA_DECL (data) \
char *p = strpbrk (line, EOLSET "\n"); \
@@ -156,7 +156,7 @@ parse_line (char *line, struct STRUCTURE *result, \
}
static inline char **
-parse_list (char *line, struct parser_data *data, int datalen)
+parse_list (char *line, struct parser_data *data, size_t datalen)
{
char *eol, **list, **p;
@@ -180,7 +180,7 @@ parse_list (char *line, struct parser_data *data, int datalen)
{
char *elt;
- if ((char *) &p[1] - (char *) data > datalen)
+ if ((size_t) ((char *) &p[1] - (char *) data) > datalen)
{
/* We cannot fit another pointer in the buffer. */
__set_errno (ERANGE);