aboutsummaryrefslogtreecommitdiff
path: root/nss
diff options
context:
space:
mode:
Diffstat (limited to 'nss')
-rw-r--r--nss/nss_files/files-XXX.c6
-rw-r--r--nss/nss_files/files-alias.c12
-rw-r--r--nss/nss_files/files-network.c1
3 files changed, 10 insertions, 9 deletions
diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c
index e3261ed454..6933986026 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 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 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
@@ -179,7 +179,7 @@ internal_getent (struct STRUCTURE *result,
do
{
/* Terminate the line so that we can test for overflow. */
- data->linebuffer[linebuflen - 1] = '\0';
+ data->linebuffer[linebuflen - 1] = '\xff';
p = fgets (data->linebuffer, linebuflen, stream);
if (p == NULL)
@@ -189,7 +189,7 @@ internal_getent (struct STRUCTURE *result,
H_ERRNO_SET (HOST_NOT_FOUND);
return NSS_STATUS_NOTFOUND;
}
- else if (data->linebuffer[linebuflen - 1] != '\0')
+ else if (data->linebuffer[linebuflen - 1] != '\xff')
{
/* The line is too long. Give the user the opportunity to
enlarge the buffer. */
diff --git a/nss/nss_files/files-alias.c b/nss/nss_files/files-alias.c
index 84d771d94e..66f3d3ad42 100644
--- a/nss/nss_files/files-alias.c
+++ b/nss/nss_files/files-alias.c
@@ -150,12 +150,12 @@ get_next_alias (const char *match, struct aliasent *result,
/* Read the first line. It must contain the alias name and
possibly some alias names. */
- first_unused[room_left - 1] = '\0';
+ first_unused[room_left - 1] = '\xff';
line = fgets (first_unused, room_left, stream);
if (line == NULL)
/* Nothing to read. */
break;
- else if (first_unused[room_left - 1] != '\0')
+ else if (first_unused[room_left - 1] != '\xff')
{
/* The line is too long for our buffer. */
no_more_room:
@@ -244,11 +244,11 @@ get_next_alias (const char *match, struct aliasent *result,
{
while (! feof (listfile))
{
- first_unused[room_left - 1] = '\0';
+ first_unused[room_left - 1] = '\xff';
line = fgets (first_unused, room_left, listfile);
if (line == NULL)
break;
- if (first_unused[room_left - 1] != '\0')
+ if (first_unused[room_left - 1] != '\xff')
{
free (old_line);
goto no_more_room;
@@ -344,9 +344,9 @@ get_next_alias (const char *match, struct aliasent *result,
/* The just read character is a white space and so
can be ignored. */
- first_unused[room_left - 1] = '\0';
+ first_unused[room_left - 1] = '\xff';
line = fgets (first_unused, room_left, stream);
- if (first_unused[room_left - 1] != '\0')
+ if (first_unused[room_left - 1] != '\xff')
goto no_more_room;
cp = strpbrk (line, "#\n");
if (cp != NULL)
diff --git a/nss/nss_files/files-network.c b/nss/nss_files/files-network.c
index 8180d46e9d..59cf0125f7 100644
--- a/nss/nss_files/files-network.c
+++ b/nss/nss_files/files-network.c
@@ -38,6 +38,7 @@ LINE_PARSER
STRING_FIELD (addr, isspace, 1);
result->n_net = inet_network (addr);
+ result->n_addrtype = AF_INET;
})