summaryrefslogtreecommitdiff
path: root/btt/seek.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2012-02-01 13:17:57 +0100
committerJens Axboe <axboe@kernel.dk>2012-02-01 13:17:57 +0100
commitf6d38abde41a7b18808dcdab393f05d6300d16c3 (patch)
treecb68e66c73f3ded1f73d966eb90da322ee4a91ab /btt/seek.c
parentd324757e0f2cfc87ddcc2fea7e59d81cc8661f1c (diff)
downloadblktrace-f6d38abde41a7b18808dcdab393f05d6300d16c3.tar.gz
blktrace-f6d38abde41a7b18808dcdab393f05d6300d16c3.tar.bz2
Fix compiler warnings
One was a real bug, assigned i_time twice instead of c_time (which was left unitialized). Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'btt/seek.c')
-rw-r--r--btt/seek.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/btt/seek.c b/btt/seek.c
index dba0071..52f6a21 100644
--- a/btt/seek.c
+++ b/btt/seek.c
@@ -100,18 +100,14 @@ static void __destroy(struct rb_node *n)
static void sps_emit(struct seeki *sip)
{
- double tstamp, s_p_s;
+ double s_p_s;
struct sps_bkt *sps = &sip->sps;
double delta = sps->t_last - sps->t_start;
- if ((sps->nseeks == 1) || (delta < DBL_EPSILON)) {
+ if ((sps->nseeks == 1) || (delta < DBL_EPSILON))
s_p_s = (double)(sps->nseeks);
- tstamp = sps->t_start;
- } else {
-
+ else
s_p_s = (double)(sps->nseeks) / delta;
- tstamp = sps->t_start + (delta / 2);
- }
fprintf(sip->sps_fp, "%15.9lf %.2lf\n", sps->t_start, s_p_s);