summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2012-11-04 03:44:49 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2012-11-04 03:44:49 +0000
commite9fb5b74a97beee829aed997f0455f0692514be1 (patch)
tree368867938fdf54b2f9e4c05b273152cf8821df48
parentdca8c1a412533dc42a3494629d7ef48459b8e52a (diff)
Use consistant initialization idiom to reduce confusion.
-rw-r--r--sbin/dhclient/privsep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/privsep.c b/sbin/dhclient/privsep.c
index cb2978a7fe0..ae0eb13ee53 100644
--- a/sbin/dhclient/privsep.c
+++ b/sbin/dhclient/privsep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep.c,v 1.20 2012/11/04 03:36:39 krw Exp $ */
+/* $OpenBSD: privsep.c,v 1.21 2012/11/04 03:44:48 krw Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
@@ -251,6 +251,7 @@ dispatch_imsg(int fd)
case IMSG_ADD_DEFAULT_ROUTE:
totlen = sizeof(hdr);
addr = NULL;
+ gateway = NULL;
if (hdr.len < totlen + sizeof(len))
error("IMSG_ADD_DEFAULT_ROUTE missing rdomain length");
buf_read(fd, &len, sizeof(len));
@@ -285,7 +286,6 @@ dispatch_imsg(int fd)
error("IMSG_ADD_DEFAULT_ROUTE missing gateway length");
buf_read(fd, &len, sizeof(len));
totlen += sizeof(len);
- gateway = NULL;
if (len == SIZE_T_MAX) {
error("IMSG_ADD_DEFAULT_ROUTE invalid gateway");
} else if (len == sizeof(*gateway)) {