Fix: max_t/min_t macros are missing cast on input
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 13 Nov 2018 17:12:21 +0000 (12:12 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Nov 2018 22:49:01 +0000 (17:49 -0500)
commit1da7b8633e51517a4daf5a0d252595e936084338
tree9741929db4c5d6e7de8470909636e86521ae4b62
parentf6739b01e44d8f106e5e971ea2551f5e6fb75cf9
Fix: max_t/min_t macros are missing cast on input

The semantic expected from max_t and min_t is to perform the max/min
comparison in the type provided as first parameter.

Cast the input parameters to the proper type before comparing them,
rather than after. There is no more need to cast the result of the
expression now that both inputs are cast to the right type.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/macros.h
This page took 0.024996 seconds and 4 git commands to generate.