]> git.ipfire.org Git - thirdparty/asterisk.git/commit
func_math: Return integer instead of float if possible
authorNaveen Albert <asterisk@phreaknet.org>
Mon, 28 Jun 2021 14:25:24 +0000 (14:25 +0000)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Thu, 19 Aug 2021 16:05:13 +0000 (11:05 -0500)
commitc52ef4ac79b9466af5cf7b17dcc2b9fa2d2badef
tree8737555e167db89fef55874624bd7d77a62b751f
parent9cac1c16da5920402372bedcb1faa7c229bf3ece
func_math: Return integer instead of float if possible

The MIN, MAX, and ABS functions all support float
arguments, but currently return floats even if the
arguments are all integers and the response is
a whole number, in which case the user is likely
expecting an integer. This casts the float to an integer
before printing into the response buffer if possible.

ASTERISK-29495

Change-Id: I902d29eacf3ecd0f8a6a5e433c97f0421d205488
funcs/func_math.c