pespin has uploaded this change for review.

View Change

mtp_sap.h: Protect MTP_SIO macro params with parenthesis

Change-Id: I0ba8139fd5458ff3637eebaaba0d4c0edd080e6a
---
M include/osmocom/sigtran/mtp_sap.h
1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/04/41404/1
diff --git a/include/osmocom/sigtran/mtp_sap.h b/include/osmocom/sigtran/mtp_sap.h
index 05308c2..f13d6f1 100644
--- a/include/osmocom/sigtran/mtp_sap.h
+++ b/include/osmocom/sigtran/mtp_sap.h
@@ -32,7 +32,7 @@
};

/* ITU Q.704 14.2 Service information octet. See enum mtp_si_ni00 in mtp.h. */
-#define MTP_SIO(service, net_ind) (((net_ind & 0x3) << 6) | (service & 0xF))
+#define MTP_SIO(service, net_ind) ((((net_ind) & 0x3) << 6) | ((service) & 0xF))

struct osmo_mtp_transfer_param {
uint32_t opc;

To view, visit change 41404. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I0ba8139fd5458ff3637eebaaba0d4c0edd080e6a
Gerrit-Change-Number: 41404
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>