[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.999.0708171208060.3666@enigma.security.iitk.ac.in>
Date: Fri, 17 Aug 2007 12:24:23 +0530 (IST)
From: Satyam Sharma <satyam@...radead.org>
To: Jeff Dike <jdike@...toit.com>
cc: Joe Perches <joe@...ches.com>,
Linux Kernel <linux-kernel@...r.kernel.org>,
user-mode-linux-devel@...ts.sourceforge.net
Subject: [PATCH] hostfs: Remove pointless if statement
[ Cc: list heavily trimmed. ]
On Thu, 16 Aug 2007, Jeff Dike wrote:
> On Wed, Aug 15, 2007 at 05:40:11PM -0700, Joe Perches wrote:
> > fs/hostfs/hostfs_user.c: if(attrs->ia_valid & HOSTFS_ATTR_CTIME) ;
>
> This one can be deleted, but I think I did it for documentation
> reasons, to make it clear that ctime handling wasn't left out by
> mistake.
We normally use "comments" for that, not dead code that a compiler
then elids ;-)
[PATCH] hostfs: Remove pointless if statement
And replace with comment saying we don't handle ctime.
Also some codingstyle while I was there.
Signed-off-by: Satyam Sharma <satyam@...radead.org>
---
fs/hostfs/hostfs_user.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/hostfs/hostfs_user.c b/fs/hostfs/hostfs_user.c
index 5625e24..a554a0a 100644
--- a/fs/hostfs/hostfs_user.c
+++ b/fs/hostfs/hostfs_user.c
@@ -283,12 +283,12 @@ int set_attr(const char *file, struct hostfs_iattr *attrs, int fd)
}
}
- if(attrs->ia_valid & HOSTFS_ATTR_CTIME) ;
- if(attrs->ia_valid & (HOSTFS_ATTR_ATIME | HOSTFS_ATTR_MTIME)){
+ /* ctime is not handled */
+ if (attrs->ia_valid & (HOSTFS_ATTR_ATIME | HOSTFS_ATTR_MTIME)){
err = stat_file(file, NULL, NULL, NULL, NULL, NULL, NULL,
&attrs->ia_atime, &attrs->ia_mtime, NULL,
NULL, NULL, fd);
- if(err != 0)
+ if (err != 0)
return err;
}
return 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists