]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Mark more data as read only.
authorRoy Marples <roy@marples.name>
Tue, 14 Jan 2014 14:40:36 +0000 (14:40 +0000)
committerRoy Marples <roy@marples.name>
Tue, 14 Jan 2014 14:40:36 +0000 (14:40 +0000)
Thanks to Sebastian Huber.

dhcp.c
dhcp6.c
dhcpcd-embedded.h.in
if-options.c
script.c

diff --git a/dhcp.c b/dhcp.c
index ae778d7f4f1828487840e7854bd06d31108b10d1..4127b30a07039dfef5219128a42dc31c8c284178 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -104,7 +104,7 @@ static const struct dhcp_op dhcp_ops[] = {
        { 0, NULL }
 };
 
-static const char *dhcp_params[] = {
+static const char * const dhcp_params[] = {
        "ip_address",
        "subnet_cidr",
        "network_number",
@@ -130,7 +130,7 @@ static int dhcp_open(struct interface *);
 void
 dhcp_printoptions(void)
 {
-       const char **p;
+       const char * const *p;
        size_t i;
        const struct dhcp_opt *opt;
 
diff --git a/dhcp6.c b/dhcp6.c
index bcbd382372a2a12f92853c23b8d071681b6892fc..8d4a22a3d2c84eec75ae0308e9c09872330e66cd 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -68,7 +68,7 @@
 //#define VENDOR_SPLIT
 
 static int sock = -1;
-static struct in6_addr in6addr_linklocal_alldhcp =
+static const struct in6_addr in6addr_linklocal_alldhcp =
     IN6ADDR_LINKLOCAL_ALLDHCP_INIT;
 static struct sockaddr_in6 from;
 static struct msghdr sndhdr;
index acce1ebe64c23a22aa7aa45f868912ea0a20c8d8..ac326bb5bdf65c6d88114978c40ca8a96b3dacc4 100644 (file)
@@ -28,4 +28,4 @@
 #define INITDEFINES    @INITDEFINES@
 #define INITDEFINE6S   @INITDEFINE6S@
 
-extern const char *dhcpcd_embedded_conf[];
+extern const char * const dhcpcd_embedded_conf[];
index c322d4782ba9535c2657e1bfac40202d593a9c29..06a17a6b3de3ee258f28ac1d41bb83d7de4d434d 100644 (file)
@@ -1554,7 +1554,7 @@ read_config(const char *file,
        int skip = 0, have_profile = 0;
 #ifndef EMBEDDED_CONFIG
        char *buf;
-       const char **e;
+       const char * const *e;
        size_t buflen, ol;
 #endif
 #if !defined(INET) || !defined(INET6)
index 133a1f6fce9ce71a0c0839c3520631e4848c5dcd..8651847068b7939d2f32e20e0045103b6feea01e 100644 (file)
--- a/script.c
+++ b/script.c
@@ -54,7 +54,7 @@
 
 #define DEFAULT_PATH   "PATH=/usr/bin:/usr/sbin:/bin:/sbin"
 
-static const char *if_params[] = {
+static const char * const if_params[] = {
        "interface",
        "reason",
        "pid",
@@ -70,7 +70,7 @@ static const char *if_params[] = {
 void
 if_printoptions(void)
 {
-       const char **p;
+       const char * const *p;
 
        for (p = if_params; *p; p++)
                printf(" -  %s\n", *p);