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
/
format_stackdriver
/
format_stackdriver.c
diff --git
a/src/utils/format_stackdriver/format_stackdriver.c
b/src/utils/format_stackdriver/format_stackdriver.c
index
80b85ae
..
9b8b547
100644
(file)
--- a/
src/utils/format_stackdriver/format_stackdriver.c
+++ b/
src/utils/format_stackdriver/format_stackdriver.c
@@
-144,16
+144,16
@@
static int format_typed_value(yajl_gen gen, int ds_type, value_t v,
}
case DS_TYPE_DERIVE: {
derive_t diff = v.derive - (derive_t)start_value;
}
case DS_TYPE_DERIVE: {
derive_t diff = v.derive - (derive_t)start_value;
- snprintf(integer, sizeof(integer), "%" PRIi64, diff);
+ s
s
nprintf(integer, sizeof(integer), "%" PRIi64, diff);
break;
}
case DS_TYPE_COUNTER: {
counter_t diff = counter_diff((counter_t)start_value, v.counter);
break;
}
case DS_TYPE_COUNTER: {
counter_t diff = counter_diff((counter_t)start_value, v.counter);
- snprintf(integer, sizeof(integer), "%llu", diff);
+ s
s
nprintf(integer, sizeof(integer), "%llu", diff);
break;
}
case DS_TYPE_ABSOLUTE: {
break;
}
case DS_TYPE_ABSOLUTE: {
- snprintf(integer, sizeof(integer), "%" PRIu64, v.absolute);
+ s
s
nprintf(integer, sizeof(integer), "%" PRIu64, v.absolute);
break;
}
default: {
break;
}
default: {
@@
-210,10
+210,10
@@
static int metric_type(char *buffer, size_t buffer_size, data_set_t const *ds,
#define GCM_PREFIX "custom.googleapis.com/collectd/"
if ((ds_index != 0) || strcmp("value", ds_name) != 0) {
#define GCM_PREFIX "custom.googleapis.com/collectd/"
if ((ds_index != 0) || strcmp("value", ds_name) != 0) {
- snprintf(buffer, buffer_size, GCM_PREFIX "%s/%s_%s", vl->plugin, vl->type,
+ s
s
nprintf(buffer, buffer_size, GCM_PREFIX "%s/%s_%s", vl->plugin, vl->type,
ds_name);
} else {
ds_name);
} else {
- snprintf(buffer, buffer_size, GCM_PREFIX "%s/%s", vl->plugin, vl->type);
+ s
s
nprintf(buffer, buffer_size, GCM_PREFIX "%s/%s", vl->plugin, vl->type);
}
char const *whitelist = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
}
char const *whitelist = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@
-280,7
+280,7
@@
static int read_cumulative_state(data_set_t const *ds, value_list_t const *vl,
}
char start_value_key[DATA_MAX_NAME_LEN];
}
char start_value_key[DATA_MAX_NAME_LEN];
- snprintf(start_value_key, sizeof(start_value_key),
+ s
s
nprintf(start_value_key, sizeof(start_value_key),
"stackdriver:start_value[%d]", ds_index);
int status =
"stackdriver:start_value[%d]", ds_index);
int status =