projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ec7b01
)
block: Avoid accessing past the end of the block_by_role array.
author
Joseph Huang
<jdhuang@stanford.edu>
Wed, 5 May 2010 16:23:55 +0000
(09:23 -0700)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Wed, 5 May 2010 16:24:22 +0000
(09:24 -0700)
src/devices/block.c
patch
|
blob
|
history
diff --git
a/src/devices/block.c
b/src/devices/block.c
index 452c4331ff41aaa16534bb998d1b490349bc4217..a3acec16066240cc098f0c31d5a5c53efb99116a 100644
(file)
--- a/
src/devices/block.c
+++ b/
src/devices/block.c
@@
-166,7
+166,7
@@
block_print_stats (void)
{
int i;
- for (i = 0; i < BLOCK_CNT; i++)
+ for (i = 0; i < BLOCK_
ROLE_
CNT; i++)
{
struct block *block = block_by_role[i];
if (block != NULL)