]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compiler warning
authorRoy Marples <roy@marples.name>
Sun, 2 Jun 2013 05:38:59 +0000 (05:38 +0000)
committerRoy Marples <roy@marples.name>
Sun, 2 Jun 2013 05:38:59 +0000 (05:38 +0000)
if-options.c

index 993ddca82631bbb7e868bb70e4342436f7aa0794..11b5e80bbb244a5928dc285afca256eb587ce025 100644 (file)
@@ -961,7 +961,9 @@ parse_option(struct if_options *ifo, int opt, const char *arg)
                        *fp++ = '\0';
                errno = 0;
                l = strtol(arg, &np, 0);
-               if (l >= 0 && l <= UINT32_MAX && errno == 0 && *np == '\0') {
+               if (l >= 0 && l <= (long)UINT32_MAX &&
+                   errno == 0 && *np == '\0')
+               {
                        u32 = htonl(l);
                        memcpy(&_iaid, &u32, sizeof(_iaid));
                        goto got_iaid;