Attention is currently required from: msuraev.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31091 )
Change subject: SI13: drop meaningless error check
......................................................................
Patch Set 1: Code-Review-2
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-bsc/+/31091/comment/21d871b0_8184acdb
PS1, Line 9: always return positive integer
> ... writing code against some potentially-could-be API which we do not even have plans introducing instead of writing it against current documented API is meaningless.
Signed rc is already the API, so a negative value is possible from the API point of view. There is nothing in the docstring saying that the returned value is always positive. You're simply assuming that the implementation of osmo_gsm48_rest_octets_si13_encode(), which is a library function, will never change. How can you be sure about that...
> ... especially given that other uses of such functions like osmo_gsm48_rest_octets_si1_encode() do not have this kind of useless checks.
Actually osmo_gsm48_rest_octets_si2quater_encode() may return a negative value, and there is such a 'useless' check in make_si2quaters(). Also, the unit test for osmo_gsm48_rest_octets_si13_encode() in libosmocore.git does check if rc is negative. These checks are not useless after all, and it's sad that we don't have them in all cases.
So IMO this patch is meaningless. I am against merging it.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31091
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ib1aeaa57ad0929fd2e1296737969d89485f0ac7b
Gerrit-Change-Number: 31091
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 04 Feb 2023 20:09:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: msuraev <msuraev(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31091 )
Change subject: SI13: drop meaningless error check
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-bsc/+/31091/comment/0be1420c_e89c06fc
PS1, Line 9: always return positive integer
> But it still returns a signed integer, and some day somebody may add an additional checks making it […]
I disagree - writing code against some potentially-could-be API which we do not even have plans introducing instead of writing it against current documented API is meaningless. It also adds unnecessary confusion for the reader - especially given that other uses of such functions like osmo_gsm48_rest_octets_si1_encode() do not have this kind of useless checks.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31091
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ib1aeaa57ad0929fd2e1296737969d89485f0ac7b
Gerrit-Change-Number: 31091
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 04 Feb 2023 19:19:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/31181 )
Change subject: rspro_server: Handle ipa_server_link_ipen() error case
......................................................................
Patch Set 1:
(1 comment)
File src/server/rspro_server.c:
https://gerrit.osmocom.org/c/osmo-remsim/+/31181/comment/126d109e_6b549f25
PS1, Line 870: talloc_free(srv);
> Don't you need to call pthread_rwlock_destroy() here, btw?
... or call rspro_server_destroy(), which does so.
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/31181
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: Ic32d53a236b80711651fb4ee196ac3b95148e61f
Gerrit-Change-Number: 31181
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Sat, 04 Feb 2023 19:08:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment