diff options
author | Stefan Sperling <ssperling@sysmocom.de> | 2018-04-09 18:31:49 +0200 |
---|---|---|
committer | Stefan Sperling <ssperling@sysmocom.de> | 2018-04-09 18:32:19 +0200 |
commit | 79e13fa11e542cf0b1b423a8970646faf0cff936 (patch) | |
tree | 8e3720f05150238770274cab14988886d1545cbc | |
parent | 801cd7acc62460a55389f0093558c32c967854d9 (diff) |
fix a format string error in bts_update_t3122_chan_load()
In a debug log message, an unsigned 64-bit value was printed with
%lu but it should be printed with PRIu64 from inttypes.h instead.
Port of osmo-bsc commit 5b6aa650f1a6df22ec99797bd3635ea791998a88
https://gerrit.osmocom.org/#/c/7687/
Change-Id: Ia29feec023117734e4f50ae3487871e715821fed
-rw-r--r-- | openbsc/src/libbsc/chan_alloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c index 5fa20af29..c4bc949c8 100644 --- a/openbsc/src/libbsc/chan_alloc.c +++ b/openbsc/src/libbsc/chan_alloc.c @@ -24,6 +24,7 @@ #include <stdlib.h> #include <string.h> #include <errno.h> +#include <inttypes.h> #include <openbsc/gsm_subscriber.h> #include <openbsc/chan_alloc.h> @@ -607,7 +608,7 @@ bts_update_t3122_chan_load(struct gsm_bts *bts) /* Log channel load average. */ load = ((used / total) * 100); - LOGP(DRLL, LOGL_DEBUG, "(bts=%d) channel load average is %lu.%.2lu%%\n", + LOGP(DRLL, LOGL_DEBUG, "(bts=%d) channel load average is %"PRIu64".%.2"PRIu64"%%\n", bts->nr, (load & 0xffffff00) >> 8, (load & 0xff) / 10); bts->chan_load_avg = ((load & 0xffffff00) >> 8); OSMO_ASSERT(bts->chan_load_avg <= 100); |