summaryrefslogtreecommitdiff
path: root/ext2fs
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-24 17:32:04 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-29 12:38:58 +0200
commit749820d7dcf8ba05d025f985f0fdc17bd6658489 (patch)
treee36ebe5fb251d01596abe55f852d9e2534d8d691 /ext2fs
parentceffc4581e83ce1299c96a17c9c5352f491d488d (diff)
ext2fs: fix type of inum
Previously, inum was of type int, whereas dino_ref expects ino_t. On Hurd/x86 the former is 32 bit wide, the latter 64. If dino_ref is inlined, this does not seem to pose a problem, but if ext2fs is compiled with -O0, this most likely results in an invalid memory access. * ext2fs/ialloc.c (ext2_alloc_inode): Use type ino_t for inum.
Diffstat (limited to 'ext2fs')
-rw-r--r--ext2fs/ialloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext2fs/ialloc.c b/ext2fs/ialloc.c
index 2d8e51e0..52212d59 100644
--- a/ext2fs/ialloc.c
+++ b/ext2fs/ialloc.c
@@ -115,7 +115,8 @@ ino_t
ext2_alloc_inode (ino_t dir_inum, mode_t mode)
{
char *bh = NULL;
- int i, j, inum, avefreei;
+ int i, j, avefreei;
+ ino_t inum;
struct ext2_group_desc *gdp;
struct ext2_group_desc *tmp;