X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fintel_rdt.c;h=62848dbfe5e24046fae4a4f3ae76606720fb47b6;hp=38f987f6fca9f62ef94af240ebe2d7145e75e75c;hb=0bbf058d6f9935e6e727cda7db79312281e2f58d;hpb=626d3ab4309cdb069289354c45ca9e2ba9bc9a2f diff --git a/src/intel_rdt.c b/src/intel_rdt.c index 38f987f6..62848dbf 100644 --- a/src/intel_rdt.c +++ b/src/intel_rdt.c @@ -28,11 +28,11 @@ * Michał Aleksiński **/ -#include +#include "collectd.h" #include "utils/common/common.h" #include "utils/config_cores/config_cores.h" #include "utils/proc_pids/proc_pids.h" -#include "collectd.h" +#include #define RDT_PLUGIN "intel_rdt" @@ -325,8 +325,12 @@ static int strlisttoarray(char *str_list, char ***names, size_t *names_num) { continue; if ((isdupstr((const char **)*names, *names_num, token))) { - ERROR(RDT_PLUGIN ": Duplicated process name \'%s\' in group \'%s\'", - token, str_list); + if (str_list != NULL) + ERROR(RDT_PLUGIN ": Duplicated process name \'%s\' in group \'%s\'", + token, str_list); + else + ERROR(RDT_PLUGIN ": Duplicated process name \'%s\'", token); + return -EINVAL; } else { if (0 != strarray_add(names, names_num, token)) {