diff options
author | roel kluin <roel.kluin@gmail.com> | 2009-01-07 21:09:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-08 11:31:14 -0500 |
commit | f15659628b43b27c20447c731456c39cbec973e9 (patch) | |
tree | 86f3a346ddf017881005413eb31a032ac8623d6d /fs/romfs/inode.c | |
parent | 921d58c0e6992f74d3a48180604a298f115d2dee (diff) |
romfs: romfs_iget() - unsigned ino >= 0 is always true
romfs_strnlen() returns int
unsigned X >= 0 is always true
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: roel kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/romfs/inode.c')
-rw-r--r-- | fs/romfs/inode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c index c97d4c931715..98a232f7196b 100644 --- a/fs/romfs/inode.c +++ b/fs/romfs/inode.c | |||
@@ -490,7 +490,7 @@ static mode_t romfs_modemap[] = | |||
490 | static struct inode * | 490 | static struct inode * |
491 | romfs_iget(struct super_block *sb, unsigned long ino) | 491 | romfs_iget(struct super_block *sb, unsigned long ino) |
492 | { | 492 | { |
493 | int nextfh; | 493 | int nextfh, ret; |
494 | struct romfs_inode ri; | 494 | struct romfs_inode ri; |
495 | struct inode *i; | 495 | struct inode *i; |
496 | 496 | ||
@@ -526,11 +526,11 @@ romfs_iget(struct super_block *sb, unsigned long ino) | |||
526 | i->i_mtime.tv_nsec = i->i_atime.tv_nsec = i->i_ctime.tv_nsec = 0; | 526 | i->i_mtime.tv_nsec = i->i_atime.tv_nsec = i->i_ctime.tv_nsec = 0; |
527 | 527 | ||
528 | /* Precalculate the data offset */ | 528 | /* Precalculate the data offset */ |
529 | ino = romfs_strnlen(i, ino+ROMFH_SIZE, ROMFS_MAXFN); | 529 | ret = romfs_strnlen(i, ino + ROMFH_SIZE, ROMFS_MAXFN); |
530 | if (ino >= 0) | 530 | if (ret >= 0) |
531 | ino = ((ROMFH_SIZE+ino+1+ROMFH_PAD)&ROMFH_MASK); | 531 | ino = (ROMFH_SIZE + ret + 1 + ROMFH_PAD) & ROMFH_MASK; |
532 | else | 532 | else |
533 | ino = 0; | 533 | ino = 0; |
534 | 534 | ||
535 | ROMFS_I(i)->i_metasize = ino; | 535 | ROMFS_I(i)->i_metasize = ino; |
536 | ROMFS_I(i)->i_dataoffset = ino+(i->i_ino&ROMFH_MASK); | 536 | ROMFS_I(i)->i_dataoffset = ino+(i->i_ino&ROMFH_MASK); |