]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Remove some const const warnings found by clang.
authorRoy Marples <roy@marples.name>
Wed, 22 May 2013 22:58:15 +0000 (22:58 +0000)
committerRoy Marples <roy@marples.name>
Wed, 22 May 2013 22:58:15 +0000 (22:58 +0000)
bpf-filter.h
dhcp.c
dhcp.h
dhcp6.c
dhcp6.h
if-options.c

index b68ee49392166a9dd225b70afa2741051ed631f3..9bd15d8d68bc3ca2ac36930a6e2975f67dacd21a 100644 (file)
@@ -30,7 +30,7 @@
 #ifndef BPF_WHOLEPACKET
 # define BPF_WHOLEPACKET ~0U
 #endif
-static const struct bpf_insn const arp_bpf_filter [] = {
+static const struct bpf_insn arp_bpf_filter [] = {
 #ifndef BPF_SKIPTYPE
        /* Make sure this is an ARP packet... */
        BPF_STMT(BPF_LD + BPF_H + BPF_ABS, 12),
@@ -75,7 +75,7 @@ static const size_t arp_bpf_filter_len =
  *   http://www.isc.org/
  */
 
-static const struct bpf_insn const dhcp_bpf_filter [] = {
+static const struct bpf_insn dhcp_bpf_filter [] = {
 #ifndef BPF_SKIPTYPE
        /* Make sure this is an IP packet... */
        BPF_STMT(BPF_LD + BPF_H + BPF_ABS, 12),
diff --git a/dhcp.c b/dhcp.c
index e863f37579af535f51615eb8d23149c3be9d0e81..a33d61ff79c36e974dfbff29c7799dfa4a500d1e 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -103,7 +103,7 @@ static const struct dhcp_op dhcp_ops[] = {
        { 0, NULL }
 };
 
-const struct dhcp_opt const dhcp_opts[] = {
+const struct dhcp_opt dhcp_opts[] = {
        { 1,    ADDRIPV4 | REQUEST,     "subnet_mask" },
                /* RFC 3442 states that the CSR has to come before all other
                 * routes. For completeness, we also specify static routes,
diff --git a/dhcp.h b/dhcp.h
index fb4dcd19735496d7e1e94dd388fc6a51c67f4c0c..c5124df135cb7d8ccfc1d979d5aea058c1b61fb3 100644 (file)
--- a/dhcp.h
+++ b/dhcp.h
@@ -237,7 +237,7 @@ struct dhcp_state {
 #include "net.h"
 
 #ifdef INET
-extern const struct dhcp_opt const dhcp_opts[];
+extern const struct dhcp_opt dhcp_opts[];
 
 char *decode_rfc3361(int dl, const uint8_t *data);
 ssize_t decode_rfc3442(char *out, ssize_t len, int pl, const uint8_t *p);
diff --git a/dhcp6.c b/dhcp6.c
index 66a1326383ce47a1f3176a13d03d10b32e771f3a..81aa6e9c0f4acbbc1a5ad5c36ca690d8ce045e23 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -100,7 +100,7 @@ static const struct dhcp6_op dhcp6_ops[] = {
 };
 
 #define IPV6A  ADDRIPV6 | ARRAY
-const struct dhcp_opt const dhcp6_opts[] = {
+const struct dhcp_opt dhcp6_opts[] = {
        { D6_OPTION_CLIENTID,           BINHEX,         "client_id" },
        { D6_OPTION_SERVERID,           BINHEX,         "server_id" },
        { D6_OPTION_IA_ADDR,            IPV6A,          "ia_addr" },
diff --git a/dhcp6.h b/dhcp6.h
index c47e23a154117a1b6501d9d6ac5ce1a8d3817cd9..c54f1115e7aae2ee5bf5675e67e8ca5a0ab57f3b 100644 (file)
--- a/dhcp6.h
+++ b/dhcp6.h
@@ -82,7 +82,7 @@
 
 #include "dhcp.h"
 #include "ipv6.h"
-extern const struct dhcp_opt const dhcp6_opts[];
+extern const struct dhcp_opt dhcp6_opts[];
 
 struct dhcp6_message {
        uint8_t type;
index 4322578039695cae81f926609f2424838558ea19..40d9f037eb8bab836216b45d099780658d73956f 100644 (file)
@@ -427,7 +427,7 @@ parse_option(struct if_options *ifo, int opt, const char *arg)
        struct in_addr addr, addr2;
        in_addr_t *naddr;
        struct rt *rt;
-       const struct dhcp_opt const *d;
+       const struct dhcp_opt *d;
        uint8_t *request, *require, *no;
        struct if_iaid *iaid;
        uint8_t _iaid[4];