[MERGED] osmo-pcu[master]: Fix format string error (string needs %s)

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu May 25 17:26:28 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: Fix format string error (string needs %s)
......................................................................


Fix format string error (string needs %s)

In a49475b5a822773ce10e28bf5a02e91de78bd063 we introduce the use of
bssgp_pdu_str() and change from printing the numeric code to the
stringified version of the message code.  However, the format string
was not updated accordingly :/

Change-Id: I7173b692fb1f222aab44cd4f44a482038d0f51dc
Fixes: Coverity CID 169684
---
M src/gprs_bssgp_pcu.cpp
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp
index e73a8c0..aeb0942 100644
--- a/src/gprs_bssgp_pcu.cpp
+++ b/src/gprs_bssgp_pcu.cpp
@@ -248,7 +248,8 @@
 		LOGP(DBSSGP, LOGL_DEBUG, "rx BSSGP_PDUT_FLOW_CONTROL_MS_ACK\n");
 		break;
 	default:
-		LOGP(DBSSGP, LOGL_NOTICE, "BSSGP BVCI=%u PDU type 0x%02x unknown\n", bctx->bvci, bssgp_pdu_str(pdu_type));
+		LOGP(DBSSGP, LOGL_NOTICE, "BSSGP BVCI=%u PDU type %s unknown\n",
+			bctx->bvci, bssgp_pdu_str(pdu_type));
 		rc = bssgp_tx_status(BSSGP_CAUSE_PROTO_ERR_UNSPEC, NULL, msg);
 		break;
 	}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7173b692fb1f222aab44cd4f44a482038d0f51dc
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list