fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/29579 )
Change subject: gsm0502: use parentheses in GSM_TDMA_FN_{SUM,SUB} macros
......................................................................
gsm0502: use parentheses in GSM_TDMA_FN_{SUM,SUB} macros
This makes it possible to pass expressions to the abovementioned
macros without any side-effects. Strictly speaking, this is only
necessary for argument 'b' of GSM_TDMA_FN_SUB, but let's also add
them to GSM_TDMA_FN_SUM for consistency.
Change-Id: I7f26156813139bbb7774e1eb342c91bc84fdad38
---
M include/osmocom/gsm/gsm0502.h
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/include/osmocom/gsm/gsm0502.h b/include/osmocom/gsm/gsm0502.h
index 1be2cc3..b6a1807 100644
--- a/include/osmocom/gsm/gsm0502.h
+++ b/include/osmocom/gsm/gsm0502.h
@@ -16,10 +16,10 @@
/*! Return the sum of two specified TDMA frame numbers (summation) */
#define GSM_TDMA_FN_SUM(a, b) \
- ((a + b) % GSM_TDMA_HYPERFRAME)
+ (((a) + (b)) % GSM_TDMA_HYPERFRAME)
/*! Return the difference of two specified TDMA frame numbers (subtraction) */
#define GSM_TDMA_FN_SUB(a, b) \
- ((a + GSM_TDMA_HYPERFRAME - b) % GSM_TDMA_HYPERFRAME)
+ (((a) + GSM_TDMA_HYPERFRAME - (b)) % GSM_TDMA_HYPERFRAME)
/*! Return the *minimum* difference of two specified TDMA frame numbers (distance) */
#define GSM_TDMA_FN_DIFF(a, b) \
OSMO_MIN(GSM_TDMA_FN_SUB(a, b), GSM_TDMA_FN_SUB(b, a))
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/29579
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I7f26156813139bbb7774e1eb342c91bc84fdad38
Gerrit-Change-Number: 29579
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/29579 )
Change subject: gsm0502: use parentheses in GSM_TDMA_FN_{SUM,SUB} macros
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/29579
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I7f26156813139bbb7774e1eb342c91bc84fdad38
Gerrit-Change-Number: 29579
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 04 Oct 2022 08:22:48 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29580 )
Change subject: bts_set_current_frame_number(): log TDMA FN of the next block
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29580
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Id28776fb5f0f85cd35d3918c79f8c8e338156aae
Gerrit-Change-Number: 29580
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 04 Oct 2022 08:22:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29580 )
Change subject: bts_set_current_frame_number(): log TDMA FN of the next block
......................................................................
Patch Set 2:
(1 comment)
File src/bts.cpp:
https://gerrit.osmocom.org/c/osmo-pcu/+/29580/comment/6412b289_a95d0ae8
PS2, Line 346: "Detected FN jump! %u -> %u (next %u)\n",
> maybe "(exp %u)" is much more clear here.
next seems to imply it's the next in series of %u -> %u -> "next".
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29580
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Id28776fb5f0f85cd35d3918c79f8c8e338156aae
Gerrit-Change-Number: 29580
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 04 Oct 2022 08:19:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29580 )
Change subject: bts_set_current_frame_number(): log TDMA FN of the next block
......................................................................
Patch Set 2:
(1 comment)
File src/bts.cpp:
https://gerrit.osmocom.org/c/osmo-pcu/+/29580/comment/6ce592ad_92849688
PS2, Line 346: "Detected FN jump! %u -> %u (next %u)\n",
maybe "(exp %u)" is much more clear here.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29580
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Id28776fb5f0f85cd35d3918c79f8c8e338156aae
Gerrit-Change-Number: 29580
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 04 Oct 2022 08:18:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-pcu/+/29580
to look at the new patch set (#2).
Change subject: bts_set_current_frame_number(): log TDMA FN of the next block
......................................................................
bts_set_current_frame_number(): log TDMA FN of the next block
Change-Id: Id28776fb5f0f85cd35d3918c79f8c8e338156aae
---
M src/bts.cpp
M tests/tbf/TbfTest.err
2 files changed, 63 insertions(+), 62 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/80/29580/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29580
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Id28776fb5f0f85cd35d3918c79f8c8e338156aae
Gerrit-Change-Number: 29580
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset