projects
/
blktrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4c52316
)
[PATCH] blkparse: remember to bail out if conversion gets too large
author
Jens Axboe
<axboe@suse.de>
Mon, 10 Oct 2005 10:52:39 +0000
(12:52 +0200)
committer
Jens Axboe
<axboe@suse.de>
Mon, 10 Oct 2005 10:52:39 +0000
(12:52 +0200)
blkparse.c
patch
|
blob
|
blame
|
history
diff --git
a/blkparse.c
b/blkparse.c
index 7317f6c58e9b666e0d5ecc511a94fa7e09004241..8fcbe8ea48f0a4a7ae0bd4fdf1780f92ee12e36a 100644
(file)
--- a/
blkparse.c
+++ b/
blkparse.c
@@
-1100,12
+1100,12
@@
static void dump_trace(struct blk_io_trace *t, struct per_cpu_info *pci,
static char *size_cnv(char *dst, unsigned long long num, int in_kb)
{
static char suff[] = { '\0', 'K', 'M', 'G', 'P' };
- int i = 0;
+
unsigned
int i = 0;
if (in_kb)
i++;
- while (num > 1000 * 1000ULL) {
+ while (num > 1000 * 1000ULL
&& (i < sizeof(suff) - 1)
) {
i++;
num /= 1000;
}