diff options
author | Mike Holmes <mike.holmes@linaro.org> | 2014-10-30 18:17:55 -0400 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2014-11-05 14:40:47 +0300 |
commit | a4f623d86c718c9f3ff14c588c667e424591d90f (patch) | |
tree | fc1d666f17f007acf224b73dc511f7280433a752 /example | |
parent | eaa8c2114c3965cfc17b6fe8ddb4db50877c6424 (diff) |
odp_example.c: fix dead code path
tot is = i which cannot leave the for loop without being positive
unless it exits entirely and never reaches the test statement.
Or QUEUE_ROUNDS is #defined to 0 rather than (512*1024)
Thus tot is always true and the else cannot execute
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'example')
-rw-r--r-- | example/odp_example/odp_example.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/example/odp_example/odp_example.c b/example/odp_example/odp_example.c index 5f25f892d..1ed4a0bf5 100644 --- a/example/odp_example/odp_example.c +++ b/example/odp_example/odp_example.c @@ -355,13 +355,8 @@ static int test_schedule_one_single(const char *str, int thr, odp_barrier_sync(barrier); clear_sched_queues(); - if (tot) { - cycles = cycles/tot; - ns = ns/tot; - } else { - cycles = 0; - ns = 0; - } + cycles = cycles/tot; + ns = ns/tot; printf(" [%i] %s enq+deq %"PRIu64" cycles, %"PRIu64" ns\n", thr, str, cycles, ns); |