From: Roy Marples Date: Wed, 4 Apr 2012 23:09:48 +0000 (+0000) Subject: Remove a needless set and fix length check of an array of IPv4 addresss. X-Git-Tag: v5.6.0~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=058a6a5893e5fafb6a649cfbc933d072472c55dc;p=thirdparty%2Fdhcpcd.git Remove a needless set and fix length check of an array of IPv4 addresss. --- diff --git a/configure.c b/configure.c index 88ff5d9a..4b610c8b 100644 --- a/configure.c +++ b/configure.c @@ -307,7 +307,6 @@ send_interface1(int fd, const struct interface *iface, const char *reason) struct iovec iov[2]; int retval; - retval = 0; make_env(iface, reason, &env); elen = arraytostr((const char *const *)env, &s); iov[0].iov_base = &elen; diff --git a/dhcp.c b/dhcp.c index cc705b3b..f39e7835 100644 --- a/dhcp.c +++ b/dhcp.c @@ -280,7 +280,7 @@ valid_length(uint8_t option, int dl, int *type) if (opt->type & UINT8) sz = sizeof(uint8_t); if (opt->type & (IPV4 | ARRAY)) - return dl % sz; + sz = dl % sizeof(uint32_t); return (dl == sz ? 0 : -1); }