All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 3/3] fs/cramfs/inode.c: remove error variable
@ 2007-08-30 15:37 Andi Drebes
  2007-08-31 11:43 ` Richard Knutsson
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Andi Drebes @ 2007-08-30 15:37 UTC (permalink / raw)
  To: kernel-janitors

This patch removes a variable from fs/cramfs/inode.c that is just used to store
a return value which is immediately read afterwards.

Tested on an i386 box.
Signed-off-by: Andi Drebes <lists-receive@programmierforen.de>
---
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index 350680f..42d2cf8 100644
--- a/fs/cramfs/inode.c
+++ b/fs/cramfs/inode.c
@@ -372,7 +372,7 @@ static int cramfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
 		char *name;
 		ino_t ino;
 		mode_t mode;
-		int namelen, error;
+		int namelen;
 
 		mutex_lock(&read_mutex);
 		de = cramfs_read(sb, OFFSET(inode) + offset, sizeof(*de)+CRAMFS_MAXPATHLEN);
@@ -398,8 +398,7 @@ static int cramfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
 				break;
 			namelen--;
 		}
-		error = filldir(dirent, buf, namelen, offset, ino, mode >> 12);
-		if (error)
+		if(filldir(dirent, buf, namelen, offset, ino, mode >> 12))
 			break;
 
 		offset = nextoffset;

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-08-31 16:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-30 15:37 [patch 3/3] fs/cramfs/inode.c: remove error variable Andi Drebes
2007-08-31 11:43 ` Richard Knutsson
2007-08-31 16:12 ` Nishanth Aravamudan
2007-08-31 16:20 ` Andi Drebes
2007-08-31 16:23 ` Richard Knutsson
2007-08-31 16:25 ` Randy Dunlap
2007-08-31 16:35 ` Richard Knutsson
2007-08-31 16:49 ` Nishanth Aravamudan

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.