* [PATCH] ext3: reduce redundant check of '*options'
@ 2011-01-13 12:42 Simon Xu
0 siblings, 0 replies; only message in thread
From: Simon Xu @ 2011-01-13 12:42 UTC (permalink / raw)
To: jack; +Cc: linux-ext4, linux-kernel, Simon Xu
We don't need to check whether '*options' equals to ',' twice.
Signed-off-by: Simon Xu <xu.simon@oracle.com>
---
fs/ext3/super.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index b7d0554..dbb84e6 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -891,13 +891,13 @@ static ext3_fsblk_t get_sb_block(void **data, struct super_block *sb)
options += 3;
/*todo: use simple_strtoll with >32bit ext3 */
sb_block = simple_strtoul(options, &options, 0);
- if (*options && *options != ',') {
+ if (*options == ',') {
+ options++;
+ } else if (*options) {
ext3_msg(sb, "error: invalid sb specification: %s",
(char *) *data);
return 1;
}
- if (*options == ',')
- options++;
*data = (void *) options;
return sb_block;
}
--
1.7.3.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-13 12:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-13 12:42 [PATCH] ext3: reduce redundant check of '*options' Simon Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).