summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-03-23 13:27:14 (GMT)
committerThomas Haller <thaller@redhat.com>2017-03-23 13:48:46 (GMT)
commit54344bc0631b16eb623bfbd91e6f7b3d03b27c09 (patch)
tree646dcddd516796c51b6efbe9a46d55b1b952c4da /lib
parente15966ac7f3b43df2acf869f98089762807d0568 (diff)
downloadlibnl-54344bc0631b16eb623bfbd91e6f7b3d03b27c09.zip
libnl-54344bc0631b16eb623bfbd91e6f7b3d03b27c09.tar.gz
libnl-54344bc0631b16eb623bfbd91e6f7b3d03b27c09.tar.bz2
all: don't use math.h or link with libm.so
Diffstat (limited to 'lib')
-rw-r--r--lib/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils.c b/lib/utils.c
index 06273c5..aaa9513 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -405,7 +405,7 @@ long nl_prob2int(const char *str)
if (*p && strcmp(p, "%") != 0)
return -NLE_INVAL;
- return rint(d * NL_PROB_MAX);
+ return (long) (((d * NL_PROB_MAX) + 0.5));
}
/** @} */