aboutsummaryrefslogtreecommitdiff
path: root/src/librc
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2011-01-05 22:33:03 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2011-01-05 22:33:03 -0800
commit647df8cfe70a667f011b38a058244528c4a22a40 (patch)
treebc87a15dbd38351663d6e3ff34d444097f10fe6d /src/librc
parent6a0812645a5460435beb8f65c7a71660db6e4be9 (diff)
Make sure old rc_sys code never runs if the rc_sys variable exists.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'src/librc')
-rw-r--r--src/librc/librc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/librc/librc.c b/src/librc/librc.c
index 868accd7..8a9fd796 100644
--- a/src/librc/librc.c
+++ b/src/librc/librc.c
@@ -290,9 +290,11 @@ librc_hidden_def(rc_sys_v1)
const char *
rc_sys(void)
{
- const char *s = rc_sys_v2();
- if(s) return s;
- return rc_sys_v1();
+ if(rc_conf_value("rc_sys")) {
+ return rc_sys_v2();
+ } else {
+ return rc_sys_v1();
+ }
}
librc_hidden_def(rc_sys)