[2.6 patch] reiserfs/xattr_acl.c:reiserfs_get_acl(): make size an int

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The Coverity checker wasn't happy seeing a size_t compared with -ENODATA 
and -ENOSYS.

Since the only place where size is set is through the result of 
reiserfs_xattr_get() which is an int, we could simply make size an int.


Signed-off-by: Adrian Bunk <[email protected]>

--- linux-2.6.16-rc5-mm3-full/fs/reiserfs/xattr_acl.c.old	2006-03-10 15:30:47.000000000 +0100
+++ linux-2.6.16-rc5-mm3-full/fs/reiserfs/xattr_acl.c	2006-03-10 15:31:49.000000000 +0100
@@ -182,7 +182,7 @@ struct posix_acl *reiserfs_get_acl(struc
 {
 	char *name, *value;
 	struct posix_acl *acl, **p_acl;
-	size_t size;
+	int size;
 	int retval;
 	struct reiserfs_inode_info *reiserfs_i = REISERFS_I(inode);
 
@@ -206,7 +206,7 @@ struct posix_acl *reiserfs_get_acl(struc
 		return posix_acl_dup(*p_acl);
 
 	size = reiserfs_xattr_get(inode, name, NULL, 0);
-	if ((int)size < 0) {
+	if (size < 0) {
 		if (size == -ENODATA || size == -ENOSYS) {
 			*p_acl = ERR_PTR(-ENODATA);
 			return NULL;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux