[patch 3/3] get rid of two unnessesary assignments in
fs/cifs/file.c
Jesper Juhl
juhl-lkml at dif.dk
Tue Dec 28 23:55:51 GMT 2004
in two places in fs/cifs/file.c we assign -EIO to a variable (rc) then
do something unrelated to rc, then return rc. The assignment of -EIO to rc
is unnessesary, we may as well just return -EIO directly and avoid the
extra assignment (yeah, the compiler will probably optimize it, but
still...).
Signed-off-by: Jesper Juhl <juhl-lkml at dif.dk>
diff -up linux-2.6.10/fs/cifs/file.c~ linux-2.6.10/fs/cifs/file.c
--- linux-2.6.10/fs/cifs/file.c~ 2004-12-29 00:41:00.000000000 +0100
+++ linux-2.6.10/fs/cifs/file.c 2004-12-29 00:40:51.000000000 +0100
@@ -1947,17 +1947,15 @@ cifs_readdir(struct file *file, void *di
xid = GetXid();
if (file->f_dentry == NULL) {
- rc = -EIO;
FreeXid(xid);
- return rc;
+ return -EIO;
}
cifs_sb = CIFS_SB(file->f_dentry->d_sb);
pTcon = cifs_sb->tcon;
bufsize = pTcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE;
if (bufsize > CIFSMaxBufSize) {
- rc = -EIO;
FreeXid(xid);
- return rc;
+ return -EIO;
}
data = kmalloc(bufsize, GFP_KERNEL);
pfindData = (FILE_DIRECTORY_INFO *)data;
More information about the samba-technical
mailing list