aboutsummaryrefslogtreecommitdiff
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 5d3774639..a9c9397f5 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -554,13 +554,9 @@ static void setup(servtab_t *sep)
554 554
555static char *nextline(void) 555static char *nextline(void)
556{ 556{
557 char *cp;
558
559 if (fgets(line, LINE_SIZE, fconfig) == NULL) 557 if (fgets(line, LINE_SIZE, fconfig) == NULL)
560 return NULL; 558 return NULL;
561 cp = strchr(line, '\n'); 559 *strchrnul(line, '\n') = '\0';
562 if (cp)
563 *cp = '\0';
564 return line; 560 return line;
565} 561}
566 562