From: Roy Marples Date: Mon, 1 Sep 2014 16:39:58 +0000 (+0000) Subject: Minor optimisation. X-Git-Tag: v6.4.4~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ff66738321b8ed860bf4dc576cfb72144fa61a13;p=thirdparty%2Fdhcpcd.git Minor optimisation. --- diff --git a/dhcp.c b/dhcp.c index 495df0be..a2d8a30d 100644 --- a/dhcp.c +++ b/dhcp.c @@ -1563,7 +1563,7 @@ send_message(struct interface *iface, uint8_t type, struct in_addr from, to; in_addr_t a = INADDR_ANY; struct timeval tv; - int s = -1; + int s; if (!callback) syslog(LOG_DEBUG, "%s: sending %s with xid 0x%x", @@ -1594,7 +1594,8 @@ send_message(struct interface *iface, uint8_t type, s = dhcp_openudp(iface); if (s == -1 && errno != EADDRINUSE) syslog(LOG_ERR, "%s: dhcp_openudp: %m", iface->name); - } + } else + s = -1; /* If we couldn't open a UDP port for our IP address * then we cannot renew.