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 <[email protected]> --- Previous patch missed a case. Fixed indent example/odp_example/odp_example.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/example/odp_example/odp_example.c b/example/odp_example/odp_example.c index 5f25f89..1ed4a0b 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); -- 2.1.0 _______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
