[PATCH] osmo-bsc[master]: libbsc: Use correct printf formatting for uint64_t

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/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Mon Oct 23 12:52:59 UTC 2017


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

libbsc: Use correct printf formatting for uint64_t

unsigned long can be 32 bits on some arch/OS, while "current" field is
always 64 bit because it's a uint64_t.

Change-Id: Ibad1e4f09cf912cb654dbe3687a3f2182e2060f5
---
M src/libbsc/bsc_vty.c
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index ca29b4c..461e3d3 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -3769,20 +3769,20 @@
 
 void openbsc_vty_print_statistics(struct vty *vty, struct gsm_network *net)
 {
-	vty_out(vty, "Channel Requests        : %lu total, %lu no channel%s",
+	vty_out(vty, "Channel Requests        : %"PRIu64" total, %"PRIu64" no channel%s",
 		net->bsc_ctrs->ctr[BSC_CTR_CHREQ_TOTAL].current,
 		net->bsc_ctrs->ctr[BSC_CTR_CHREQ_NO_CHANNEL].current,
 		VTY_NEWLINE);
-	vty_out(vty, "Channel Failures        : %lu rf_failures, %lu rll failures%s",
+	vty_out(vty, "Channel Failures        : %"PRIu64" rf_failures, %"PRIu64" rll failures%s",
 		net->bsc_ctrs->ctr[BSC_CTR_CHAN_RF_FAIL].current,
 		net->bsc_ctrs->ctr[BSC_CTR_CHAN_RLL_ERR].current,
 		VTY_NEWLINE);
-	vty_out(vty, "Paging                  : %lu attempted, %lu complete, %lu expired%s",
+	vty_out(vty, "Paging                  : %"PRIu64" attempted, %"PRIu64" complete, %"PRIu64" expired%s",
 		net->bsc_ctrs->ctr[BSC_CTR_PAGING_ATTEMPTED].current,
 		net->bsc_ctrs->ctr[BSC_CTR_PAGING_COMPLETED].current,
 		net->bsc_ctrs->ctr[BSC_CTR_PAGING_EXPIRED].current,
 		VTY_NEWLINE);
-	vty_out(vty, "BTS failures            : %lu OML, %lu RSL%s",
+	vty_out(vty, "BTS failures            : %"PRIu64" OML, %"PRIu64" RSL%s",
 		net->bsc_ctrs->ctr[BSC_CTR_BTS_OML_FAIL].current,
 		net->bsc_ctrs->ctr[BSC_CTR_BTS_RSL_FAIL].current,
 		VTY_NEWLINE);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibad1e4f09cf912cb654dbe3687a3f2182e2060f5
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list