}
char name[THREAD_NAME_MAX];
- snprintf(name, sizeof(name), "reader#%" PRIu64, (uint64_t)read_threads_num);
+ ssnprintf(name, sizeof(name), "reader#%" PRIu64,
+ (uint64_t)read_threads_num);
set_thread_name(read_threads[read_threads_num], name);
read_threads_num++;
}
char name[THREAD_NAME_MAX];
- snprintf(name, sizeof(name), "writer#%" PRIu64,
- (uint64_t)write_threads_num);
+ ssnprintf(name, sizeof(name), "writer#%" PRIu64,
+ (uint64_t)write_threads_num);
set_thread_name(write_threads[write_threads_num], name);
write_threads_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)) {