]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Remove now unused variables.
authorRoy Marples <roy@marples.name>
Wed, 19 Jun 2019 10:41:06 +0000 (10:41 +0000)
committerRoy Marples <roy@marples.name>
Wed, 19 Jun 2019 10:41:06 +0000 (10:41 +0000)
src/dhcp-common.c
src/dhcp.c
src/dhcp6.c

index 6d66ebefb8a96053e77429a1c02a2bb4064a2e11..45a26b2a3d3d3ef382780964e8147d64776b108d 100644 (file)
@@ -627,7 +627,7 @@ print_option(FILE *fp, const char *prefix, const struct dhcp_opt *opt,
        uint32_t u32;
        int32_t s32;
        struct in_addr addr;
-       ssize_t bytes = 0, sl;
+       ssize_t sl;
        size_t l;
 
        /* Ensure a valid length */
@@ -679,7 +679,6 @@ print_option(FILE *fp, const char *prefix, const struct dhcp_opt *opt,
        if (opt->type & OT_BITFLAG) {
                /* bitflags are a string, MSB first, such as ABCDEFGH
                 * where A is 10000000, B is 01000000, etc. */
-               bytes = 0;
                for (l = 0, sl = sizeof(opt->bitflags) - 1;
                    l < sizeof(opt->bitflags);
                    l++, sl--)
index 7b8541361adfd8949a5c1c775b23c3977635dcfe..781f2a0e0aae8c26f20abc5f6cd2c1b79c5769be 100644 (file)
@@ -1290,12 +1290,11 @@ dhcp_env(FILE *fenv, const char *prefix, const struct interface *ifp,
        struct in_addr net;
        struct in_addr brd;
        struct dhcp_opt *opt, *vo;
-       size_t e, i, pl;
+       size_t i, pl;
        char safe[(BOOTP_FILE_LEN * 4) + 1];
        uint8_t overl = 0;
        uint32_t en;
 
-       e = 0;
        ifo = ifp->options;
        if (get_option_uint8(ifp->ctx, &overl, bootp, bootp_len,
            DHO_OPTSOVERLOADED) == -1)
index 6ebb591a1020ad3f07b38e1ce0be906c3a85770a..85ceef98d8526aa892b957592c02523c45817583 100644 (file)
@@ -3959,7 +3959,7 @@ dhcp6_env(FILE *fp, const char *prefix, const struct interface *ifp,
        struct dhcp_opt *opt, *vo;
        const uint8_t *p;
        struct dhcp6_option o;
-       size_t i, n;
+       size_t i;
        char *pfx;
        uint32_t en;
        const struct dhcpcd_ctx *ctx;
@@ -3968,7 +3968,6 @@ dhcp6_env(FILE *fp, const char *prefix, const struct interface *ifp,
        const struct ipv6_addr *ap;
 #endif
 
-       n = 0;
        if (m == NULL)
                goto delegated;