summaryrefslogtreecommitdiff
path: root/net/honeyd/files/patch-dhcpclient.c
blob: 95d38335a0cdc87c54bd472e363bad45baa1ade0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- dhcpclient.c.orig	Thu Apr 14 16:07:26 2005
+++ dhcpclient.c	Thu Apr 14 15:24:19 2005
@@ -236,8 +236,8 @@
 {
 	struct dhcpclient_req *req = tmpl->dhcp_req;
 	struct dhcp_msg *msg = (struct dhcp_msg *)buf;
-	size_t optlen = buflen - sizeof(*msg);
-	uint8_t *p, *end, opt1, opt1len, *opt1p;
+	size_t optlen = buflen - sizeof(*msg), opt1len;
+	uint8_t *p, *end, opt1, *opt1p;
 	short replyreq = 0, ack = 0, done = 0;
 	struct netconf nc;
 	struct addr *which = NULL, ipmask;
@@ -472,7 +472,8 @@
 
 	memset(buf, 0, sizeof(buf));
 
-	eth = (struct eth_hdr *)p = buf;
+	p = buf;
+	eth = (struct eth_hdr *)p;
 	eth_pack_hdr(eth, ETH_ADDR_BROADCAST, req->ea, ETH_TYPE_IP);
 
 	restlen -= ETH_HDR_LEN;
@@ -524,7 +525,8 @@
 
 	memset(buf, 0, sizeof(buf));
 
-	eth = (struct eth_hdr *)p = buf;
+	p = buf;
+	eth = (struct eth_hdr *)p;
 	eth_pack_hdr(eth, req->server_ea, req->ea, ETH_TYPE_IP);
 
 	restlen -= ETH_HDR_LEN;