From d6a36f37684f6e8e3bc453f4e09aae5b3cffec68 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 26 May 2016 18:17:31 +0200 Subject: [PATCH] configuration.c - fix unchecked return value --- configuration.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/configuration.c b/configuration.c index 2fd735f633..0d924af02f 100644 --- a/configuration.c +++ b/configuration.c @@ -1673,15 +1673,17 @@ static bool config_load_file(const char *path, bool set_defaults) } { - bool tmp_bool; - char tmp[64] = {0}; - strlcpy(tmp, "perfcnt_enable", sizeof(tmp)); - config_get_bool(conf, tmp, &tmp_bool); + bool tmp_bool = false; + char tmp[64] = {0}; - if (tmp_bool) - runloop_ctl(RUNLOOP_CTL_SET_PERFCNT_ENABLE, NULL); - else - runloop_ctl(RUNLOOP_CTL_UNSET_PERFCNT_ENABLE, NULL); + strlcpy(tmp, "perfcnt_enable", sizeof(tmp)); + if (config_get_bool(conf, tmp, &tmp_bool)) + { + if (tmp_bool) + runloop_ctl(RUNLOOP_CTL_SET_PERFCNT_ENABLE, NULL); + else + runloop_ctl(RUNLOOP_CTL_UNSET_PERFCNT_ENABLE, NULL); + } } #if TARGET_OS_IPHONE