diff options
author | Martin Peschke <mpeschke@linux.vnet.ibm.com> | 2009-04-20 16:07:11 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-04-21 09:21:55 +0200 |
commit | b5f8804a588fffdea10a0cd46a36fc196acea9f2 (patch) | |
tree | 83415101c606bf5eebd1bb22ab6e60609c7b9128 | |
parent | 8d388c8ea6a58186bfdf7ca7fc4e1268eced8b14 (diff) | |
download | blktrace-b5f8804a588fffdea10a0cd46a36fc196acea9f2.tar.gz blktrace-b5f8804a588fffdea10a0cd46a36fc196acea9f2.tar.bz2 |
fix off-by-one issues in blkiomon.h
Fix two off-by-one issues. Last bucket of histogram was ommitted by mistake
when being converted to big-endian or when being merged with another bucket.
Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r-- | stats.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -124,7 +124,7 @@ static inline void histlog2_merge(struct histlog2 *h, __u32 *dst, __u32 *src) { int i; - for (i = 0; i < h->num - 1; i++) + for (i = 0; i < h->num; i++) dst[i] += src[i]; } @@ -132,7 +132,7 @@ static inline void histlog2_to_be(__u32 a[], struct histlog2 *h) { int i; - for (i = 0; i < h->num - 1; i++) + for (i = 0; i < h->num; i++) a[i] = cpu_to_be32(a[i]); } |