]> 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)
committerKevin Harwell <kharwell@digium.com>
Thu, 19 Aug 2021 16:13:04 +0000 (11:13 -0500)
commit4bd5757123238928df4c7e61702bcfc56f5699da
tree0295d286d818cf84af2acf16c5d8ed585f42d35a
parent10556602522cbf0470b4df414ea2352b44703659
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