aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2022-10-11 19:34:43 +0300
committerMax <msuraev@sysmocom.de>2022-10-11 19:34:43 +0300
commit68588c57efc6e93cb4836460a3b3835ae6a33fb5 (patch)
tree4a10371aa63785a8a55a544d79c929fde35ef551
parent7bd1670520d630c37f6a2dd0233aa1f4cb7f782a (diff)
cosmetic: make linter happy with LAPD code
The weird formatting not only makes it hard to read but caused linter to fail in the follow-up patch. Change-Id: Ie4e56b4796c1b8f270a692453faccf102c963db5
-rw-r--r--src/gsm/lapd_core.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c
index ced8bc05..61fcc2f1 100644
--- a/src/gsm/lapd_core.c
+++ b/src/gsm/lapd_core.c
@@ -767,8 +767,7 @@ static void lapd_acknowledge(struct lapd_msg_ctx *lctx)
* link layer entity shall reset the timer T200 on
* receipt of a valid I frame with N(R) higher than V(A),
* or an REJ with an N(R) equal to V(A). */
- if ((!rej && nr != dl->v_ack)
- || (rej && nr == dl->v_ack)) {
+ if ((!rej && nr != dl->v_ack) || (rej && nr == dl->v_ack)) {
t200_reset = 1;
lapd_stop_t200(dl);
/* 5.5.3.1 Note 1 + 2 imply timer recovery cond. */
@@ -777,8 +776,7 @@ static void lapd_acknowledge(struct lapd_msg_ctx *lctx)
* N(R) is called valid, if and only if
* (N(R)-V(A)) mod 8 <= (V(S)-V(A)) mod 8.
*/
- if (sub_mod(nr, dl->v_ack, dl->v_range)
- > sub_mod(dl->v_send, dl->v_ack, dl->v_range)) {
+ if (sub_mod(nr, dl->v_ack, dl->v_range) > sub_mod(dl->v_send, dl->v_ack, dl->v_range)) {
LOGDL(dl, LOGL_NOTICE, "N(R) sequence error\n");
mdl_error(MDL_CAUSE_SEQ_ERR, lctx);
}