diff options
author | 2006-09-23 04:56:43 +0000 | |
---|---|---|
committer | 2006-09-23 04:56:43 +0000 | |
commit | 9e85a730332aa7006353f5a12dae6893acedef7f (patch) | |
tree | 588fb91fc1c7119bb345d9c84e9beb7a52e33b2d /lib | |
parent | typo, remove reference to lfs (diff) | |
download | wireguard-openbsd-9e85a730332aa7006353f5a12dae6893acedef7f.tar.xz wireguard-openbsd-9e85a730332aa7006353f5a12dae6893acedef7f.zip |
If fgetln() != NULL, len == 0 is impossible, so remove check.
OK otto@ and jaredy@.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/net/res_init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/net/res_init.c b/lib/libc/net/res_init.c index 43ee5ac6bb2..ef5926118a0 100644 --- a/lib/libc/net/res_init.c +++ b/lib/libc/net/res_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_init.c,v 1.34 2005/12/22 06:52:11 tedu Exp $ */ +/* $OpenBSD: res_init.c,v 1.35 2006/09/23 04:56:43 ray Exp $ */ /* * ++Copyright++ 1985, 1989, 1993 @@ -286,8 +286,8 @@ _res_init(int usercall) /* read the config file */ buf[0] = '\0'; while ((cp = fgetln(fp, &len)) != NULL) { - /* skip lines that are too long or zero length */ - if (len >= sizeof(buf) || len == 0) + /* skip lines that are too long */ + if (len >= sizeof(buf)) continue; (void)memcpy(buf, cp, len); buf[len] = '\0'; |