diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-04-05 19:31:37 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-04-05 19:31:37 +0000 |
commit | d456245e527a2f95ab28f31f54dd29cbb66301b9 (patch) | |
tree | 8e4a6fa28d56b6e8dcbecbfe36bd9e7087641e2f | |
parent | 2b5b5e4f3dd6339dbc26d3fdf40561f6ce6d71b7 (diff) |
send_packet() and writev() return ssize_t, not int. Use correct
type to store the returned value. From dhill.
-rw-r--r-- | sbin/dhclient/bpf.c | 5 | ||||
-rw-r--r-- | usr.sbin/dhcpd/bpf.c | 5 | ||||
-rw-r--r-- | usr.sbin/dhcpd/dhcp.c | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/sbin/dhclient/bpf.c b/sbin/dhclient/bpf.c index 900039da52e..83b0914b8c4 100644 --- a/sbin/dhclient/bpf.c +++ b/sbin/dhclient/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.26 2013/02/14 20:39:46 krw Exp $ */ +/* $OpenBSD: bpf.c,v 1.27 2013/04/05 19:31:36 krw Exp $ */ /* BPF socket interface code, originally contributed by Archie Cobbs. */ @@ -266,7 +266,8 @@ send_packet(struct in_addr from, struct sockaddr_in *to, unsigned char buf[256]; struct iovec iov[IOVCNT]; struct msghdr msg; - int result, bufp = 0; + ssize_t result; + int bufp = 0; if (to->sin_addr.s_addr == INADDR_BROADCAST) { assemble_hw_header(buf, &bufp, hto); diff --git a/usr.sbin/dhcpd/bpf.c b/usr.sbin/dhcpd/bpf.c index a17147d03e3..e63c9efe5d6 100644 --- a/usr.sbin/dhcpd/bpf.c +++ b/usr.sbin/dhcpd/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.9 2013/02/03 21:04:19 krw Exp $ */ +/* $OpenBSD: bpf.c,v 1.10 2013/04/05 19:31:36 krw Exp $ */ /* BPF socket interface code, originally contributed by Archie Cobbs. */ @@ -235,7 +235,8 @@ send_packet(struct interface_info *interface, struct dhcp_packet *raw, { unsigned char buf[256]; struct iovec iov[2]; - int result, bufp = 0; + ssize_t result; + int bufp = 0; /* Assemble the headers... */ assemble_hw_header(interface, buf, &bufp, hto); diff --git a/usr.sbin/dhcpd/dhcp.c b/usr.sbin/dhcpd/dhcp.c index f0a85b0550f..bfef5a6a0cb 100644 --- a/usr.sbin/dhcpd/dhcp.c +++ b/usr.sbin/dhcpd/dhcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcp.c,v 1.35 2013/03/22 23:45:52 krw Exp $ */ +/* $OpenBSD: dhcp.c,v 1.36 2013/04/05 19:31:36 krw Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998, 1999 @@ -557,7 +557,8 @@ nak_lease(struct packet *packet, struct iaddr *cip) { struct sockaddr_in to; struct in_addr from; - int result, i; + ssize_t result; + int i; struct dhcp_packet raw; unsigned char nak = DHCPNAK; struct packet outgoing; |