(Illustration by Gaich Muramatsu)
Get rid of warning since CODA_MAXNAMLEN is 255 and d_namlen is unsigned char so can only have value from 0..255 fs/coda/dir.c: In function `coda_venus_readdir': fs/coda/dir.c:592: warning: comparison is always false due to limited range of data type diff -Nru a/fs/coda/dir.c b/fs/coda/dir.c --- a/fs/coda/dir.c Wed Sep 10 21:34:40 2003 +++ b/fs/coda/dir.c Wed Sep 10 21:34:40 2003 @@ -588,8 +588,7 @@ break; } /* validate whether the directory file actually makes sense */ - if (vdir->d_reclen < vdir_size + vdir->d_namlen || - vdir->d_namlen > CODA_MAXNAMLEN) { + if (vdir->d_reclen < vdir_size + vdir->d_namlen) { printk("coda_venus_readdir: Invalid dir: %ld\n", filp->f_dentry->d_inode->i_ino); ret = -EBADF;Received on 2003-09-11 08:47:56