[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1294922362-2237-1-git-send-email-xu.simon@oracle.com>
Date: Thu, 13 Jan 2011 20:39:22 +0800
From: Simon Xu <xu.simon@...cle.com>
To: jack@...e.cz
Cc: linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org,
Simon Xu <xu.simon@...cle.com>
Subject: [PATCH] ext2: reduce redundant check of '*options'
We don't need to check whether '*options' equals to ',' twice.
Signed-off-by: Simon Xu <xu.simon@...cle.com>
---
fs/ext2/super.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 7731695..bd5b66b 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -377,13 +377,13 @@ static unsigned long get_sb_block(void **data)
return 1; /* Default location */
options += 3;
sb_block = simple_strtoul(options, &options, 0);
- if (*options && *options != ',') {
+ if (*options == ',') {
+ options++;
+ } else if (*options) {
printk("EXT2-fs: Invalid sb specification: %s\n",
(char *) *data);
return 1;
}
- if (*options == ',')
- options++;
*data = (void *) options;
return sb_block;
}
--
1.7.3.5
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists