diff options
author | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-11-14 16:24:36 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-11-14 16:29:30 +0900 |
commit | 9262c76e246a23ef89d04c94d6114eb3f9c5a626 (patch) | |
tree | 767aab3d593e56454d825ec0fc7f26c38f5bfdf6 | |
parent | 9a5ebe1140f90b1b58415e7121d714c07a2d7c0c (diff) | |
download | libdrm-9262c76e246a23ef89d04c94d6114eb3f9c5a626.tar.gz libdrm-9262c76e246a23ef89d04c94d6114eb3f9c5a626.tar.bz2 libdrm-9262c76e246a23ef89d04c94d6114eb3f9c5a626.zip |
ipptest: check 0 value before division
For avgerage calculation, this patch adds to check 0 value for
division.
Change-Id: Ie4f0cd6d447dec1acf707226e9e63eef7f74d3c3
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
-rw-r--r-- | tests/ipptest/fimctest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ipptest/fimctest.c b/tests/ipptest/fimctest.c index a01c6740..655c0ffb 100644 --- a/tests/ipptest/fimctest.c +++ b/tests/ipptest/fimctest.c @@ -501,7 +501,7 @@ int main(int argc, char **argv) sum += usec[i]; } printf("fimc : result files are in %s\n", RESULT_PATH); - printf("avg : [%d]\n", sum / i); + printf("avg : [%d]\n", (i ? sum / i : 0)); } getchar(); } |