diff options
author | Daniel Walton <dwalton@cumulusnetworks.com> | 2016-06-21 16:24:29 +0200 |
---|---|---|
committer | Daniel Walton <dwalton@cumulusnetworks.com> | 2016-06-21 16:31:43 +0200 |
commit | c9deb8fd4512802f4e1ad86b5ed32217358d7ea8 (patch) | |
tree | a463087c6990599617019d9c29ada3edf75a4143 | |
parent | zebra: Change bitwise operations to purpose-built macros (diff) | |
download | frr-c9deb8fd4512802f4e1ad86b5ed32217358d7ea8.tar.xz frr-c9deb8fd4512802f4e1ad86b5ed32217358d7ea8.zip |
Fix build warnings in start-stop-daemon.c
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-11484
(cherry picked from commit 39dcf9acd87b18ab00f9f71ec15fdd89fff4b3c8)
-rw-r--r-- | cumulus/start-stop-daemon.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cumulus/start-stop-daemon.c b/cumulus/start-stop-daemon.c index e317bb801..ea63fbc21 100644 --- a/cumulus/start-stop-daemon.c +++ b/cumulus/start-stop-daemon.c @@ -107,7 +107,7 @@ LIST_HEAD(namespace_head, namespace); struct namespace { LIST_ENTRY(namespace) list; - char *path; + const char *path; int nstype; }; @@ -222,12 +222,12 @@ clear(struct pid_list **list) *list = NULL; } -static char * +static const char * next_dirname(const char *s) { - char *cur; + const char *cur; - cur = (char *)s; + cur = (const char *)s; if (*cur != '\0') { for (; *cur != '/'; ++cur) @@ -248,7 +248,7 @@ add_namespace(const char *path) const char *nsdirname, *nsname, *cur; struct namespace *namespace; - cur = (char *)path; + cur = (const char *)path; nsdirname = nsname = ""; while ((cur = next_dirname(cur))[0] != '\0') { @@ -266,7 +266,7 @@ add_namespace(const char *path) badusage("invalid namepspace path"); namespace = xmalloc(sizeof(*namespace)); - namespace->path = (char *)path; + namespace->path = (const char *)path; namespace->nstype = nstype; LIST_INSERT_HEAD(&namespace_head, namespace, list); } |