summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-12-21 03:41:23 +0000
committerbrian <brian@FreeBSD.org>1997-12-21 03:41:23 +0000
commit7b8bd2fd06738abe0e1e0eb87154f320ec80c37d (patch)
tree0659766f7e1783638872ed490bf365ae76041d31 /usr.sbin/ppp
parentcdc7eebe4cf9314d44129acfc6162fcc55ab68cc (diff)
downloadFreeBSD-src-7b8bd2fd06738abe0e1e0eb87154f320ec80c37d.zip
FreeBSD-src-7b8bd2fd06738abe0e1e0eb87154f320ec80c37d.tar.gz
Cosmetic: Test for comment lines after the lenght has been established.
Pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org>
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/systems.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/ppp/systems.c b/usr.sbin/ppp/systems.c
index 595cc21..6d4435b 100644
--- a/usr.sbin/ppp/systems.c
+++ b/usr.sbin/ppp/systems.c
@@ -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';
OpenPOWER on IntegriCloud