projects
/
platform
/
upstream
/
libgc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5378975
)
Eliminate 'FP divide-by-zero' static analyzer warning
author
Ivan Maidanski
<ivmai@mail.ru>
Thu, 29 Sep 2016 08:02:31 +0000
(11:02 +0300)
committer
Ivan Maidanski
<ivmai@mail.ru>
Thu, 29 Sep 2016 08:02:31 +0000
(11:02 +0300)
* tests/disclaim_bench.c (main): Print "N/A" (i.e. do not invoke
printf with t/(double)free_count) if free_count <= 0.
tests/disclaim_bench.c
patch
|
blob
|
history
diff --git
a/tests/disclaim_bench.c
b/tests/disclaim_bench.c
index
2984e8f
..
bf9048f
100644
(file)
--- a/
tests/disclaim_bench.c
+++ b/
tests/disclaim_bench.c
@@
-135,7
+135,7
@@
int main(int argc, char **argv)
t = MS_TIME_DIFF(tF, tI)*1e-3;
# endif
- if (model < 2)
+ if (model < 2
&& free_count > 0
)
printf("%20s: %12.4lf %12lg %12lg\n", model_str[model],
free_count/(double)ALLOC_CNT, t, t/free_count);
else