osmo-bts[master]: Check return value to prevent crash

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Sep 6 13:52:01 UTC 2017


Patch Set 2: Code-Review+1

(3 comments)

https://gerrit.osmocom.org/#/c/3878/2/src/osmo-bts-litecell15/l1_transp_hw.c
File src/osmo-bts-litecell15/l1_transp_hw.c:

Line 208: 	if (rc < 0) {
is count == 0 a valid case? check 'rc <= 0' here?

...or now that I look at it, below loop frees remaining msgbs, so rc <= 0 could just set count = 0, no need to dup the msgb free loop.


Line 211: 		return 0;
I notice that previously this function always returned 1. Is 'return 0' used by a caller?


https://gerrit.osmocom.org/#/c/3878/2/src/osmo-bts-sysmo/l1_transp_hw.c
File src/osmo-bts-sysmo/l1_transp_hw.c:

Line 219: 	if (rc < 0) {
(same 3 questions)


-- 
To view, visit https://gerrit.osmocom.org/3878
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I956c8d551f45c9dd43b5e9de11dfe20dd8783647
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list