Don't core dump on blank lines.

This commit is contained in:
mycroft 1993-10-11 20:53:48 +00:00
parent 91ebf777c7
commit 0c4b6b5612
1 changed files with 5 additions and 2 deletions

View File

@ -39,7 +39,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)inetd.c 5.30 (Berkeley) 6/3/91";*/
static char rcsid[] = "$Id: inetd.c,v 1.3 1993/08/01 17:59:33 mycroft Exp $";
static char rcsid[] = "$Id: inetd.c,v 1.4 1993/10/11 20:53:48 mycroft Exp $";
#endif /* not lint */
/*
@ -672,7 +672,10 @@ more:
;
if (cp == NULL)
return ((struct servtab *)0);
sep->se_service = newstr(skip(&cp));
arg = skip(&cp);
if (arg == NULL)
goto more;
sep->se_service = newstr(arg);
arg = skip(&cp);
if (strcmp(arg, "stream") == 0)
sep->se_socktype = SOCK_STREAM;