simplify test for skippable lines

This commit is contained in:
lukem 1997-10-07 14:46:48 +00:00
parent 0d2bc0fdb6
commit 6ea62c3327
2 changed files with 5 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mknetid.c,v 1.2 1997/07/18 21:57:07 thorpej Exp $ */
/* $NetBSD: mknetid.c,v 1.3 1997/10/07 14:46:48 lukem Exp $ */
/*
* Copyright (c) 1996 Mats O Jansson <moj@stacken.kth.se>
@ -160,7 +160,7 @@ main(argc, argv)
if (domain == NULL)
if (yp_get_default_domain(&domain))
errx(1, "can't get YP domain name");
errx(1, "Can't get YP domain name");
if ((pfile = fopen(PasswdFile, "r")) == NULL)
err(1, "%s", PasswdFile);
@ -267,11 +267,7 @@ read_passwd(pfile, fname)
line_no++;
len = strlen(line);
if (len > 1) {
if (line[0] == '#') {
continue;
}
} else
if (len <= 1 || data_line[0] == '#')
continue;
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdethers.c,v 1.3 1997/07/18 21:57:08 thorpej Exp $ */
/* $NetBSD: stdethers.c,v 1.4 1997/10/07 14:56:10 lukem Exp $ */
/*
* Copyright (c) 1995 Mats O Jansson <moj@stacken.kth.se>
@ -109,11 +109,7 @@ main(argc, argv)
line_no++;
len = strlen(data_line);
if (len > 1) {
if (data_line[0] == '#') {
continue;
}
} else
if (len <= 1 || data_line[0] == '#')
continue;
/*