[Ocfs2-tools-devel] [PATCH] mkfs.ocfs2: remove duplicated code in init_record
zren at suse.com
zren at suse.com
Sun Aug 30 22:21:42 PDT 2015
From: Eric Ren <zren at suse.com>
In function init_record(), rec->flags is initialized twice. Remove
the duplicated code line.
Signed-off-by: Eric Ren <zren at suse.com>
---
mkfs.ocfs2/mkfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mkfs.ocfs2/mkfs.c b/mkfs.ocfs2/mkfs.c
index 7abea73..043a5c7 100644
--- a/mkfs.ocfs2/mkfs.c
+++ b/mkfs.ocfs2/mkfs.c
@@ -2797,13 +2797,12 @@ init_record(State *s, SystemFileDiskRecord *rec, int type, int mode)
{
memset(rec, 0, sizeof(SystemFileDiskRecord));
- rec->flags = OCFS2_VALID_FL | OCFS2_SYSTEM_FL;
+ rec->flags = (OCFS2_VALID_FL | OCFS2_SYSTEM_FL);
rec->mode = mode;
rec->links = S_ISDIR(mode) ? 0 : 1;
rec->bi.used_bits = rec->bi.total_bits = 0;
- rec->flags = (OCFS2_VALID_FL | OCFS2_SYSTEM_FL);
switch (type) {
case SFI_JOURNAL:
--
2.1.4
More information about the Ocfs2-tools-devel
mailing list