[PATCH] osmo-bsc[master]: fix a format string error in bts_update_t3122_chan_load()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Stefan Sperling gerrit-no-reply at lists.osmocom.org
Mon Apr 9 11:33:47 UTC 2018


Review at  https://gerrit.osmocom.org/7687

fix a format string error in bts_update_t3122_chan_load()

In a debug log message, a 64-bit value was printed with %lu (32 bit
or 64 bit, depending on the platform), but it should be printed with
an %llu format directive instead (64 bit everywhere).

Change-Id: I09bb519e68886e650647b1369fd49d1964e76c7e
---
M src/libbsc/chan_alloc.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/87/7687/1

diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c
index 284cb21..de291e8 100644
--- a/src/libbsc/chan_alloc.c
+++ b/src/libbsc/chan_alloc.c
@@ -660,7 +660,7 @@
 
 	/* 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 %llu.%.2lu%%\n",
 	     bts->nr, (load & 0xffffff00) >> 8, (load & 0xff) / 10);
 	bts->chan_load_avg = ((load & 0xffffff00) >> 8);
 	OSMO_ASSERT(bts->chan_load_avg <= 100);

-- 
To view, visit https://gerrit.osmocom.org/7687
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09bb519e68886e650647b1369fd49d1964e76c7e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>



More information about the gerrit-log mailing list