Change in libosmocore[master]: gsm0808_utils: fix gsm48 multirate configuration generator

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Feb 28 15:47:50 UTC 2019


Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13081 )

Change subject: gsm0808_utils: fix gsm48 multirate configuration generator
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/13081/1/src/gsm/gsm0808_utils.c
File src/gsm/gsm0808_utils.c:

https://gerrit.osmocom.org/#/c/13081/1/src/gsm/gsm0808_utils.c@1417
PS1, Line 1417: 		return -EINVAL;
EINVAL should be returned if the input data was wrong. However, here it looks more like the check is reporting an implementation error of this function.  If some input data is given that results in more than 4 codecs to be chosen, then this function is broken because it didn't constrain itself to four.

Wouldn't it make more sense to simply check after each count++ if we now have 4.  And if we have four, return those four rather than adding more and then returning EINVAL?



-- 
To view, visit https://gerrit.osmocom.org/13081
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6fd7f4073b84093742c322752f2fd878d1071e15
Gerrit-Change-Number: 13081
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-CC: Harald Welte <laforge at gnumonks.org>
Gerrit-Comment-Date: Thu, 28 Feb 2019 15:47:50 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190228/b72520fd/attachment.htm>


More information about the gerrit-log mailing list