summaryrefslogtreecommitdiff
path: root/networking/inetd.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/inetd.c')
-rw-r--r--networking/inetd.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/networking/inetd.c b/networking/inetd.c
index 5d37746..a9c9397 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -554,13 +554,9 @@ static void setup(servtab_t *sep)
static char *nextline(void)
{
- char *cp;
-
if (fgets(line, LINE_SIZE, fconfig) == NULL)
return NULL;
- cp = strchr(line, '\n');
- if (cp)
- *cp = '\0';
+ *strchrnul(line, '\n') = '\0';
return line;
}