diff options
Diffstat (limited to 'lib/libc/net')
-rw-r--r-- | lib/libc/net/rcmd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c index a05ec73..34ac18b 100644 --- a/lib/libc/net/rcmd.c +++ b/lib/libc/net/rcmd.c @@ -366,14 +366,16 @@ __ivaliduser(hostf, raddr, luser, ruser) return (-1); while (fgets(buf, sizeof(buf), hostf)) { - if(buf[0] == '#') - continue; p = buf; /* Skip lines that are too long. */ if (strchr(p, '\n') == NULL) { while ((ch = getc(hostf)) != '\n' && ch != EOF); continue; } + if (*p == '\n' || *p == '#') { + /* comment... */ + continue; + } while (*p != '\n' && *p != ' ' && *p != '\t' && *p != '\0') { *p = isupper(*p) ? tolower(*p) : *p; p++; |