summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorray <ray@openbsd.org>2006-09-23 04:56:43 +0000
committerray <ray@openbsd.org>2006-09-23 04:56:43 +0000
commit9e85a730332aa7006353f5a12dae6893acedef7f (patch)
tree588fb91fc1c7119bb345d9c84e9beb7a52e33b2d /lib
parenttypo, remove reference to lfs (diff)
downloadwireguard-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.c6
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';