X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fintel_rdt.c;fp=src%2Fintel_rdt.c;h=7966daa5e304ebf7d40a12125ba2ffdd34e78c7f;hp=2e0fe0fce3833e9c7d9544e4f84e7fcbbb605fd6;hb=1035fba8812893e50d00a871e3399cc1ece3b384;hpb=47c86ace348a1d7a5352a83d10935209f89aa4f5 diff --git a/src/intel_rdt.c b/src/intel_rdt.c index 2e0fe0fc..7966daa5 100644 --- a/src/intel_rdt.c +++ b/src/intel_rdt.c @@ -544,43 +544,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; }