commit: db4a578273dbfa15b8b96686391bcc9ecc04b646
Author: Jason Zaman <jason <AT> perfinion <DOT> com>
AuthorDate: Sun Sep 17 15:52:52 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Sep 17 16:41:24 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=db4a5782
selinux: fix const qualifier warning
rc-selinux.c: In function ‘selinux_setup’:
rc-selinux.c:361:9: warning: assignment discards ‘const’ qualifier from pointer
target type [-Wdiscarded-qualifiers]
curr_t = context_type_get(curr_con);
^
src/rc/rc-selinux.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/rc/rc-selinux.c b/src/rc/rc-selinux.c
index 514ca5e5..bfaf1556 100644
--- a/src/rc/rc-selinux.c
+++ b/src/rc/rc-selinux.c
@@ -358,14 +358,13 @@ void selinux_setup(char **argv)
goto out;
}
- curr_t = context_type_get(curr_con);
+ curr_t = xstrdup(context_type_get(curr_con));
if (!curr_t) {
context_free(curr_con);
free(curr_context);
goto out;
}
- curr_t = xstrdup(curr_t);
/* dont need them anymore so free() now */
context_free(curr_con);
free(curr_context);