summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorray <>2006-09-23 04:56:43 +0000
committerray <>2006-09-23 04:56:43 +0000
commit13a6567d19b818b40c2d187fe1ffedd4d405167e (patch)
treeabc329c88a8f60ff09abd1b4bcb59eae714e2dba
parent6ea1c04e14cde761e2faac093669b503a7965de7 (diff)
downloadopenbsd-13a6567d19b818b40c2d187fe1ffedd4d405167e.tar.gz
openbsd-13a6567d19b818b40c2d187fe1ffedd4d405167e.tar.bz2
openbsd-13a6567d19b818b40c2d187fe1ffedd4d405167e.zip
If fgetln() != NULL, len == 0 is impossible, so remove check.
OK otto@ and jaredy@.
-rw-r--r--src/lib/libc/net/res_init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libc/net/res_init.c b/src/lib/libc/net/res_init.c
index 43ee5ac6bb..ef5926118a 100644
--- a/src/lib/libc/net/res_init.c
+++ b/src/lib/libc/net/res_init.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: res_init.c,v 1.34 2005/12/22 06:52:11 tedu Exp $ */ 1/* $OpenBSD: res_init.c,v 1.35 2006/09/23 04:56:43 ray Exp $ */
2 2
3/* 3/*
4 * ++Copyright++ 1985, 1989, 1993 4 * ++Copyright++ 1985, 1989, 1993
@@ -286,8 +286,8 @@ _res_init(int usercall)
286 /* read the config file */ 286 /* read the config file */
287 buf[0] = '\0'; 287 buf[0] = '\0';
288 while ((cp = fgetln(fp, &len)) != NULL) { 288 while ((cp = fgetln(fp, &len)) != NULL) {
289 /* skip lines that are too long or zero length */ 289 /* skip lines that are too long */
290 if (len >= sizeof(buf) || len == 0) 290 if (len >= sizeof(buf))
291 continue; 291 continue;
292 (void)memcpy(buf, cp, len); 292 (void)memcpy(buf, cp, len);
293 buf[len] = '\0'; 293 buf[len] = '\0';