Change in libosmocore[master]: core/msgb.h: drop meaningless parameter of msgb_eq_* helpers

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Mar 27 09:51:55 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13405 )

Change subject: core/msgb.h: drop meaningless parameter of msgb_eq_* helpers
......................................................................

core/msgb.h: drop meaningless parameter of msgb_eq_* helpers

Thanks to the following Doxygen warning:

  msgb.h:XXX: warning: The following parameters of
              msgb_eq_l2(msg1, msgb2, len) are not documented:
                parameter 'msgb2'
                parameter 'len'

it was discovered that parameter 'len' is not required at all.
It basically doesn't make any sense to pass any length value,
because it can be calculated using msgb_length().

Let's drop this parameter. Given that this part of the API was
broken so far (see I1079d629abdb8770eef6be7341e586a933cd9cca),
it should be more or less safe to do this.

Change-Id: Icd9b72eb6bfa9628ff1ed2f948b57058551a4328
---
M include/osmocom/core/msgb.h
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h
index 5de391e..273fc16 100644
--- a/include/osmocom/core/msgb.h
+++ b/include/osmocom/core/msgb.h
@@ -668,35 +668,35 @@
  *  \param[in] msg2 reference message buffer
  *  \returns boolean indicating whether msgb content is equal
  */
-#define msgb_eq(msg1, msg2, len) msgb_eq_data(msg1, msgb_data(msg2), msgb_length(msg2))
+#define msgb_eq(msg1, msg2) msgb_eq_data(msg1, msgb_data(msg2), msgb_length(msg2))
 
 /*! Compare msgbs L1 content
  *  \param[in] msg1 message buffer
  *  \param[in] msg2 reference message buffer
  *  \returns boolean indicating whether msgb L1 content is equal
  */
-#define msgb_eq_l1(msg1, msg2, len) msgb_eq_l1_data(msg1, msgb_l1(msg2), msgb_l1len(msg2))
+#define msgb_eq_l1(msg1, msg2) msgb_eq_l1_data(msg1, msgb_l1(msg2), msgb_l1len(msg2))
 
 /*! Compare msgbs L2 content
  *  \param[in] msg1 message buffer
  *  \param[in] msg2 reference message buffer
  *  \returns boolean indicating whether msgb L2 content is equal
  */
-#define msgb_eq_l2(msg1, msg2, len) msgb_eq_l2_data(msg1, msgb_l2(msg2), msgb_l2len(msg2))
+#define msgb_eq_l2(msg1, msg2) msgb_eq_l2_data(msg1, msgb_l2(msg2), msgb_l2len(msg2))
 
 /*! Compare msgbs L3 content
  *  \param[in] msg1 message buffer
  *  \param[in] msg2 reference message buffer
  *  \returns boolean indicating whether msgb L3 content is equal
  */
-#define msgb_eq_l3(msg1, msg2, len) msgb_eq_l3_data(msg1, msgb_l3(msg2), msgb_l3len(msg2))
+#define msgb_eq_l3(msg1, msg2) msgb_eq_l3_data(msg1, msgb_l3(msg2), msgb_l3len(msg2))
 
 /*! Compare msgbs L4 content
  *  \param[in] msg1 message buffer
  *  \param[in] msg2 reference message buffer
  *  \returns boolean indicating whether msgb L4 content is equal
  */
-#define msgb_eq_l4(msg1, msg2, len) msgb_eq_l4_data(msg1, msgb_l4(msg2), msgb_l4len(msg2))
+#define msgb_eq_l4(msg1, msg2) msgb_eq_l4_data(msg1, msgb_l4(msg2), msgb_l4len(msg2))
 
 
 /* non inline functions to ease binding */

-- 
To view, visit https://gerrit.osmocom.org/13405
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Icd9b72eb6bfa9628ff1ed2f948b57058551a4328
Gerrit-Change-Number: 13405
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190327/3258cff3/attachment.html>


More information about the gerrit-log mailing list