From 39dcf9acd87b18ab00f9f71ec15fdd89fff4b3c8 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Tue, 21 Jun 2016 14:24:29 +0000 Subject: [PATCH] Fix build warnings in start-stop-daemon.c Signed-off-by: Daniel Walton Reviewed-by: Donald Sharp Ticket: CM-11484 --- cumulus/start-stop-daemon.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cumulus/start-stop-daemon.c b/cumulus/start-stop-daemon.c index e317bb801c..ea63fbc217 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); } -- 2.39.5