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)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 25 Jun 2019 15:16:34 +0000 (11:16 -0400)
commit33a7d8c5ca99a1bbd1c2b915f9b8a37203ae072a
tree35cde435a06ff426b3706a460045cecfd39279a7
parent9cc0ed0d6d8ed76fd453adb1dd4276e94ee8590a
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.039778 seconds and 5 git commands to generate.