aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-11-28 01:03:56 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2020-11-28 01:03:56 +0100
commit492b0e425ff7179407a535f84e5214ca4e5ee0d0 (patch)
tree25c4cafe1690d00e0e9582ad180759fedd36745c
parent920491936e1d4636d55c44d2faaad4bb06de27ee (diff)
statsd: Fix fmt specifierpespin/modbus
-rw-r--r--src/stats_statsd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/stats_statsd.c b/src/stats_statsd.c
index d4496677..99764e64 100644
--- a/src/stats_statsd.c
+++ b/src/stats_statsd.c
@@ -32,6 +32,7 @@
#include <string.h>
#include <stdint.h>
+#include <inttypes.h>
#include <errno.h>
#include <osmocom/core/utils.h>
@@ -100,15 +101,15 @@ static int osmo_stats_reporter_statsd_send(struct osmo_stats_reporter *srep,
if (prefix) {
if (name1)
- fmt = "%1$s.%2$s.%6$u.%3$s:%4$d|%5$s";
+ fmt = "%1$s.%2$s.%6$u.%3$s:%4$" PRId64 "|%5$s";
else
- fmt = "%1$s.%2$0.0s%3$s:%4$d|%5$s";
+ fmt = "%1$s.%2$0.0s%3$s:%4$" PRId64 "|%5$s";
} else {
prefix = "";
if (name1)
- fmt = "%1$s%2$s.%6$u.%3$s:%4$d|%5$s";
+ fmt = "%1$s%2$s.%6$u.%3$s:%4$" PRId64 "|%5$s";
else
- fmt = "%1$s%2$0.0s%3$s:%4$d|%5$s";
+ fmt = "%1$s%2$0.0s%3$s:%4$" PRId64 "|%5$s";
}
if (srep->agg_enabled) {