All of lore.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] reiserfs/xattr_acl.c:reiserfs_get_acl(): make size an int
@ 2006-03-10 14:39 Adrian Bunk
  0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2006-03-10 14:39 UTC (permalink / raw)
  To: reiserfs-dev; +Cc: linux-kernel

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 <bunk@stusta.de>

--- 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-10 14:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-10 14:39 [2.6 patch] reiserfs/xattr_acl.c:reiserfs_get_acl(): make size an int Adrian Bunk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.