Cosmetic: Test for comment lines after the lenght has been established.
Pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org>
This commit is contained in:
parent
8fe71e0656
commit
0ec82e961e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=31918
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: systems.c,v 1.31 1997/12/17 21:22:01 brian Exp $
|
||||
* $Id: systems.c,v 1.32 1997/12/21 02:11:48 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -288,10 +288,8 @@ ReadSystem(const char *name, const char *file, int doexec)
|
||||
if (issep(*cp)) {
|
||||
n = strspn(cp, " \t");
|
||||
cp += n;
|
||||
if (*cp == '#')
|
||||
continue;
|
||||
len = strlen(cp);
|
||||
if (!len)
|
||||
if (!len || *cp == '#')
|
||||
continue;
|
||||
if (cp[len-1] == '\n')
|
||||
cp[--len] = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user