diff options
| author | Martin Schwenke <martin@meltin.net> | 2009-04-21 16:50:37 +1000 |
|---|---|---|
| committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2009-05-12 14:45:14 +1000 |
| commit | d59cd199e4d92de57aa232be534a81dbffeb15fe (patch) | |
| tree | 0301bf7248c976ef8919f3c4e730a929a52d9b7d /ctdb/tests/src | |
| parent | 7c7c5b3489f97154b2d25cefafb55e04c8846c5d (diff) | |
| download | samba-d59cd199e4d92de57aa232be534a81dbffeb15fe.tar.gz samba-d59cd199e4d92de57aa232be534a81dbffeb15fe.tar.xz samba-d59cd199e4d92de57aa232be534a81dbffeb15fe.zip | |
Avoid floating point divide by 0 in ctdb_fetch.c's bench_fetch().
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3c67e164eb92591f8763883430490805c1dfa9ed)
Diffstat (limited to 'ctdb/tests/src')
| -rw-r--r-- | ctdb/tests/src/ctdb_fetch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/tests/src/ctdb_fetch.c b/ctdb/tests/src/ctdb_fetch.c index aab4fe118f..eecbb8416a 100644 --- a/ctdb/tests/src/ctdb_fetch.c +++ b/ctdb/tests/src/ctdb_fetch.c @@ -132,7 +132,7 @@ static void bench_fetch(struct ctdb_context *ctdb, struct event_context *ev) start_timer(); while (end_timer() < timelimit) { - if (pnn == 0 && msg_count % 100 == 0) { + if (pnn == 0 && msg_count % 100 == 0 && end_timer() > 0) { printf("Fetch: %.2f msgs/sec\r", msg_count/end_timer()); fflush(stdout); } |
