Patchwork [1/2] mkfs.ubifs: remove duplicated code

login
register
mail settings
Submitter Corentin Chary
Date May 25, 2009, 6:26 a.m.
Message ID <1243232787-29108-2-git-send-email-corentincj@iksaif.net>
Download mbox | patch
Permalink /patch/27600/
State New
Headers show

Comments

Corentin Chary - May 25, 2009, 6:26 a.m.
ino->uid        = cpu_to_le32(st->st_uid);
ino->gid        = cpu_to_le32(st->st_gid);
was present twice.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
---
 mkfs.ubifs/mkfs.ubifs.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
Artem Bityutskiy - May 25, 2009, 7:49 a.m.
On Mon, 2009-05-25 at 08:26 +0200, Corentin Chary wrote:
> ino->uid        = cpu_to_le32(st->st_uid);
> ino->gid        = cpu_to_le32(st->st_gid);
> was present twice.
> 
> Signed-off-by: Corentin Chary <corentincj@iksaif.net>

Pushed this one, thanks.

Patch

diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c
index ebebfae..c0c1c29 100644
--- a/mkfs.ubifs/mkfs.ubifs.c
+++ b/mkfs.ubifs/mkfs.ubifs.c
@@ -1011,8 +1011,6 @@  static int add_inode_with_data(struct stat *st, ino_t inum, void *data,
 	ino->mtime_nsec = 0;
 	ino->uid        = cpu_to_le32(st->st_uid);
 	ino->gid        = cpu_to_le32(st->st_gid);
-	ino->uid        = cpu_to_le32(st->st_uid);
-	ino->gid        = cpu_to_le32(st->st_gid);
 	ino->mode       = cpu_to_le32(st->st_mode);
 	ino->flags      = cpu_to_le32(use_flags);
 	ino->data_len   = cpu_to_le32(data_len);