aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Zaman <jason@perfinion.com>2017-09-17 23:52:52 +0800
committerWilliam Hubbs <w.d.hubbs@gmail.com>2017-09-17 11:41:24 -0500
commitdb4a578273dbfa15b8b96686391bcc9ecc04b646 (patch)
tree5357107f69aa3c69ed10b2b63e5036a38e4b4c16 /src
parentb1c3422f453921e838d419640fe39144dbf8d13d (diff)
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); ^
Diffstat (limited to 'src')
-rw-r--r--src/rc/rc-selinux.c3
1 files changed, 1 insertions, 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);