Hello Ruben Undheim,

I'd like you to do a code review. Please visit

    https://gerrit.osmocom.org/c/osmo-bsc/+/14811

to review the following change.


Change subject: Fix one struct for big-endian archs
......................................................................

Fix one struct for big-endian archs

Change-Id: Ic6e654e0d95d662942c6485097f0b96e1fa46ead
---
M src/ipaccess/network_listen.c
1 file changed, 7 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/11/14811/1

diff --git a/src/ipaccess/network_listen.c b/src/ipaccess/network_listen.c
index bbaf798..d4fa4de 100644
--- a/src/ipaccess/network_listen.c
+++ b/src/ipaccess/network_listen.c
@@ -39,6 +39,8 @@
 #include <osmocom/bsc/debug.h>
 #include <osmocom/abis/e1_input.h>

+#include <osmocom/core/endian.h>
+
 #define WHITELIST_MAX_SIZE ((NUM_ARFCNS*2)+2+1)

 int ipac_rxlevstat2whitelist(uint16_t *buf, const struct rxlev_stats *st, 
uint8_t min_rxlev,
@@ -119,8 +121,13 @@
 } __attribute__((packed));

 struct ipacc_cusage_elem {
+#if OSMO_IS_LITTLE_ENDIAN == 1
        uint16_t arfcn:10,
                  rxlev:6;
+#else
+       uint16_t rxlev:6,
+      arfcn:10;
+#endif
 } __attribute__ ((packed));

 static int test_rep(void *_msg)

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/14811
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ic6e654e0d95d662942c6485097f0b96e1fa46ead
Gerrit-Change-Number: 14811
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <[email protected]>
Gerrit-Reviewer: Ruben Undheim <[email protected]>
Gerrit-MessageType: newchange

Reply via email to