[Asterisk-code-review] translate: Avoid absolute value on unsigned substraction. (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Fri Jan 5 17:12:16 CST 2018


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/7815 )

Change subject: translate: Avoid absolute value on unsigned substraction.
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.asterisk.org/#/c/7815/1/main/translate.c
File main/translate.c:

https://gerrit.asterisk.org/#/c/7815/1/main/translate.c@1418
PS1, Line 1418: 				unsigned int gap_selected_dst = ast_format_get_sample_rate(bestdst);
> I agree the change is needed but I think the fix should be implemented in a
Creating a helper macro/function in this file would be good.  I don't think really should be made a general utility macro/function.  I don't think other places "inline" this abs() functionality with unsigned ints.



-- 
To view, visit https://gerrit.asterisk.org/7815
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib904d9ee0d46b6fdd1476fbc464fbbf813304017
Gerrit-Change-Number: 7815
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Fri, 05 Jan 2018 23:12:16 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180105/1256e146/attachment.html>


More information about the asterisk-code-review mailing list