]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
~0U is better than just ~0 for this.
authorRoy Marples <roy@marples.name>
Wed, 29 Oct 2008 08:13:15 +0000 (08:13 +0000)
committerRoy Marples <roy@marples.name>
Wed, 29 Oct 2008 08:13:15 +0000 (08:13 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index 4c30dfca39835cdf95058364fabd0aee1b736893..c8631e39466aacd2f51fa0301be126d9fc836af6 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -537,7 +537,7 @@ decode_rfc3442_rt(int dl, const uint8_t *data)
                if (ocets > 0) {
                        memcpy(&rt->dest.s_addr, p, ocets);
                        p += ocets;
-                       rt->net.s_addr = htonl(~0 << (32 - cidr));
+                       rt->net.s_addr = htonl(~0U << (32 - cidr));
                }
 
                /* Finally, snag the router */