aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-04-23 15:11:20 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-04-23 15:17:01 +0700
commitd16b69f29e2e09efdebb2bff60b98c62c7b717b5 (patch)
treed818dc1e1a56f55a92af63f34eba51ee95713d04
parent43033e692301d816575ed75183d14c9a62abae55 (diff)
common/rsl.c: fix size argument in memcmp() callHEADmaster
Found using clang-8: rsl.c:1607:93: warning: size argument in 'memcmp' call is a comparison [-Wmemsize-comparison] rsl.c:1607:7: note: did you mean to compare the result of 'memcmp' instead? It looks more logical to compare the result of memcmp() against zero instead of passing 'sizeof(sysinfo_buf_t) != 0' as size. Change-Id: Ia8b95b017dbbfeb058d479fbaaf4861930569bb5
-rw-r--r--src/common/rsl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 5287201..8f5d689 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1604,7 +1604,7 @@ static int rsl_rx_sacch_inf_mod(struct msgb *msg)
uint16_t len = TLVP_LEN(&tp, RSL_IE_L3_INFO);
lapdm_ui_prefix_lchan(lchan, TLVP_VAL(&tp, RSL_IE_L3_INFO), osmo_si, len);
- if (memcmp(GSM_BTS_SI(bts, osmo_si), TLVP_VAL(&tp, RSL_IE_L3_INFO), sizeof(sysinfo_buf_t) != 0))
+ if (memcmp(GSM_BTS_SI(bts, osmo_si), TLVP_VAL(&tp, RSL_IE_L3_INFO), sizeof(sysinfo_buf_t)) != 0)
lchan->si.overridden |= (1 << osmo_si);
else
lchan->si.overridden &= ~(1 << osmo_si);