[MERGED] openbsc[master]: fix a format string error in bts_update_t3122_chan_load()

2018-04-09 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: fix a format string error in bts_update_t3122_chan_load()
..


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
---
M openbsc/src/libbsc/chan_alloc.c
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c
index 5fa20af..c4bc949 100644
--- a/openbsc/src/libbsc/chan_alloc.c
+++ b/openbsc/src/libbsc/chan_alloc.c
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -607,7 +608,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 
%"PRIu64".%.2"PRIu64"%%\n",
 bts->nr, (load & 0xff00) >> 8, (load & 0xff) / 10);
bts->chan_load_avg = ((load & 0xff00) >> 8);
OSMO_ASSERT(bts->chan_load_avg <= 100);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia29feec023117734e4f50ae3487871e715821fed
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 


openbsc[master]: fix a format string error in bts_update_t3122_chan_load()

2018-04-09 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia29feec023117734e4f50ae3487871e715821fed
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No



openbsc[master]: fix a format string error in bts_update_t3122_chan_load()

2018-04-09 Thread Pau Espin Pedrol

Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia29feec023117734e4f50ae3487871e715821fed
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[PATCH] openbsc[master]: fix a format string error in bts_update_t3122_chan_load()

2018-04-09 Thread Stefan Sperling

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

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
---
M openbsc/src/libbsc/chan_alloc.c
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/93/7693/1

diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c
index 5fa20af..c4bc949 100644
--- a/openbsc/src/libbsc/chan_alloc.c
+++ b/openbsc/src/libbsc/chan_alloc.c
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -607,7 +608,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 
%"PRIu64".%.2"PRIu64"%%\n",
 bts->nr, (load & 0xff00) >> 8, (load & 0xff) / 10);
bts->chan_load_avg = ((load & 0xff00) >> 8);
OSMO_ASSERT(bts->chan_load_avg <= 100);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia29feec023117734e4f50ae3487871e715821fed
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling