[MERGED] openbsc[master]: libbsc: Use correct printf formatting for uint64_t

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Mon Oct 23 15:50:09 UTC 2017


Pau Espin Pedrol has submitted this change and it was merged.

Change subject: 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(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



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: merged
Gerrit-Change-Id: I9719c69ef661bb46d8bb43cf8d6537c3e8d47826
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>


More information about the gerrit-log mailing list