projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add snprintf wrapper for GCC 8.2/3
[collectd.git]
/
src
/
utils
/
config_cores
/
config_cores.c
diff --git
a/src/utils/config_cores/config_cores.c
b/src/utils/config_cores/config_cores.c
index
13ea687
..
b6dedbc
100644
(file)
--- a/
src/utils/config_cores/config_cores.c
+++ b/
src/utils/config_cores/config_cores.c
@@
-254,7
+254,7
@@
int config_cores_parse(const oconfig_item_t *ci, core_groups_list_t *cgl) {
} else {
for (size_t j = 0; j < n && cg_idx < STATIC_ARRAY_SIZE(cgroups); j++) {
char desc[DATA_MAX_NAME_LEN];
} else {
for (size_t j = 0; j < n && cg_idx < STATIC_ARRAY_SIZE(cgroups); j++) {
char desc[DATA_MAX_NAME_LEN];
- snprintf(desc, sizeof(desc), "%u", cores[j]);
+ s
s
nprintf(desc, sizeof(desc), "%u", cores[j]);
cgroups[cg_idx].desc = strdup(desc);
if (cgroups[cg_idx].desc == NULL) {
cgroups[cg_idx].desc = strdup(desc);
if (cgroups[cg_idx].desc == NULL) {
@@
-313,7
+313,7
@@
int config_cores_default(int num_cores, core_groups_list_t *cgl) {
for (int i = 0; i < num_cores; i++) {
char desc[DATA_MAX_NAME_LEN];
for (int i = 0; i < num_cores; i++) {
char desc[DATA_MAX_NAME_LEN];
- snprintf(desc, sizeof(desc), "%d", i);
+ s
s
nprintf(desc, sizeof(desc), "%d", i);
cgl->cgroups[i].cores = calloc(1, sizeof(*(cgl->cgroups[i].cores)));
if (cgl->cgroups[i].cores == NULL) {
cgl->cgroups[i].cores = calloc(1, sizeof(*(cgl->cgroups[i].cores)));
if (cgl->cgroups[i].cores == NULL) {