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 <pma...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-CC: Harald Welte <lafo...@gnumonks.org>
Gerrit-Comment-Date: Thu, 28 Feb 2019 15:47:50 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No

Reply via email to