Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/13404


Change subject: core/msgb.h: fix dead msgb2 reference in msgb_eq_* helpers
......................................................................

core/msgb.h: fix dead msgb2 reference in msgb_eq_* helpers

Neither Doxygen documentation of the msgb data comparison helpers,
nor their actual definitions does refer msgb2. Instead, 'msg2' is
referenced in both cases. This was discovered while investigating
the following Doxygen warnings:

  msgb.h:XXX: warning: argument 'msg2' of command @param is not
              found in the argument list of
              msgb_eq(msg1, msgb2, len)

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

Due to this bug it was impossible to use the affected macros,
because 'msg2' was not listed in their parameters. Having the
unit test coverage would spot this bug at the beginning!

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



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/04/13404/1

diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h
index f006b34..5de391e 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, msgb2, len) msgb_eq_data(msg1, msgb_data(msg2), 
msgb_length(msg2))
+#define msgb_eq(msg1, msg2, len) 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, msgb2, len) msgb_eq_l1_data(msg1, msgb_l1(msg2), 
msgb_l1len(msg2))
+#define msgb_eq_l1(msg1, msg2, len) 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, msgb2, len) msgb_eq_l2_data(msg1, msgb_l2(msg2), 
msgb_l2len(msg2))
+#define msgb_eq_l2(msg1, msg2, len) 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, msgb2, len) msgb_eq_l3_data(msg1, msgb_l3(msg2), 
msgb_l3len(msg2))
+#define msgb_eq_l3(msg1, msg2, len) 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, msgb2, len) msgb_eq_l4_data(msg1, msgb_l4(msg2), 
msgb_l4len(msg2))
+#define msgb_eq_l4(msg1, msg2, len) msgb_eq_l4_data(msg1, msgb_l4(msg2), 
msgb_l4len(msg2))


 /* non inline functions to ease binding */

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1079d629abdb8770eef6be7341e586a933cd9cca
Gerrit-Change-Number: 13404
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilira...@gmail.com>

Reply via email to