[PATCH] openbsc[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:56:28 UTC 2017


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

libbsc: Use correct printf formatting for uint64_t

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: I9719c69ef661bb46d8bb43cf8d6537c3e8d47826
---
M openbsc/src/libbsc/bsc_vty.c
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/80/4380/1

diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index 0d5377d..f50ebd8 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -3750,20 +3750,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/4380
To unsubscribe, visit https://gerrit.osmocom.org/settings

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



More information about the gerrit-log mailing list