casadm: don't cast a float to an int explicitly

If an underflowed float number was casted to an int explicitly, it's value was
rounded to a lower value.

Using `round()` function ensures that the number will be always rounded to a
nearest integer.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk
2021-01-29 09:25:16 -05:00
parent c00dc77d0e
commit ffaaaa0a34
2 changed files with 3 additions and 2 deletions

View File

@@ -83,7 +83,7 @@ CFLAGS += -Wall -Werror -z relro -z now -fstack-protector -fPIC -Wformat -Wfo
#
# Flags for linking
#
LDFLAGS = -z noexecstack -z relro -z now -pie -pthread
LDFLAGS = -z noexecstack -z relro -z now -pie -pthread -lm
#
# Targets
#