From: Ruben Kerkhof Date: Tue, 6 Jun 2017 08:28:19 +0000 (+0200) Subject: Merge pull request #2310 from octo/ff/intel_rdt X-Git-Tag: collectd-5.7.2~1 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=25ecb56638f243b36b1f274c67a5c40d7d23ee6a;hp=edcf39cc377d2de0744412209de4eeb50ca7ed5f Merge pull request #2310 from octo/ff/intel_rdt intel_rdt plugin: Remove unnecessary goto. --- diff --git a/src/intel_rdt.c b/src/intel_rdt.c index 73288366..6f157b8f 100644 --- a/src/intel_rdt.c +++ b/src/intel_rdt.c @@ -527,43 +527,36 @@ rdt_preinit_error1: } static int rdt_config(oconfig_item_t *ci) { - int ret = 0; - - ret = rdt_preinit(); - if (ret != 0) { + if (rdt_preinit() != 0) { g_state = CONFIGURATION_ERROR; /* if we return -1 at this point collectd reports a failure in configuration and aborts */ - goto exit; + return (0); } for (int i = 0; i < ci->children_num; i++) { oconfig_item_t *child = ci->children + i; if (strcasecmp("Cores", child->key) == 0) { - - ret = rdt_config_cgroups(child); - if (ret != 0) { + if (rdt_config_cgroups(child) != 0) { g_state = CONFIGURATION_ERROR; /* if we return -1 at this point collectd reports a failure in configuration and aborts */ - goto exit; + return (0); } #if COLLECT_DEBUG rdt_dump_cgroups(); #endif /* COLLECT_DEBUG */ - } else { ERROR(RDT_PLUGIN ": Unknown configuration parameter \"%s\".", child->key); } } -exit: return (0); }