2020-06-05 08:17:47

by Lukas Czerner

[permalink] [raw]
Subject: [PATCH 1/4] e2fsck: remove unused variable 'new_array'

Signed-off-by: Lukas Czerner <[email protected]>
---
e2fsck/rehash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/e2fsck/rehash.c b/e2fsck/rehash.c
index 1616d07a..b356b92d 100644
--- a/e2fsck/rehash.c
+++ b/e2fsck/rehash.c
@@ -109,7 +109,7 @@ static int fill_dir_block(ext2_filsys fs,
void *priv_data)
{
struct fill_dir_struct *fd = (struct fill_dir_struct *) priv_data;
- struct hash_entry *new_array, *ent;
+ struct hash_entry *ent;
struct ext2_dir_entry *dirent;
char *dir;
unsigned int offset, dir_offset, rec_len, name_len;
--
2.21.3


2020-06-05 08:17:47

by Lukas Czerner

[permalink] [raw]
Subject: [PATCH 4/4] ext2fs: remove unused variable 'left'

Signed-off-by: Lukas Czerner <[email protected]>
---
lib/ext2fs/swapfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c
index 5b93b501..bc9f3230 100644
--- a/lib/ext2fs/swapfs.c
+++ b/lib/ext2fs/swapfs.c
@@ -456,12 +456,11 @@ errcode_t ext2fs_dirent_swab_out2(ext2_filsys fs, char *buf,
{
errcode_t retval;
char *p, *end;
- unsigned int rec_len, left;
+ unsigned int rec_len;
struct ext2_dir_entry *dirent;

p = buf;
end = buf + size;
- left = size;
while (p < end) {
dirent = (struct ext2_dir_entry *) p;
retval = ext2fs_get_rec_len(fs, dirent, &rec_len);
--
2.21.3

2020-06-05 20:37:27

by Andreas Dilger

[permalink] [raw]
Subject: Re: [PATCH 1/4] e2fsck: remove unused variable 'new_array'


> On Jun 5, 2020, at 2:14 AM, Lukas Czerner <[email protected]> wrote:
>
> Signed-off-by: Lukas Czerner <[email protected]>

Reviewed-by: Andreas Dilger <[email protected]>

> ---
> e2fsck/rehash.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/e2fsck/rehash.c b/e2fsck/rehash.c
> index 1616d07a..b356b92d 100644
> --- a/e2fsck/rehash.c
> +++ b/e2fsck/rehash.c
> @@ -109,7 +109,7 @@ static int fill_dir_block(ext2_filsys fs,
> void *priv_data)
> {
> struct fill_dir_struct *fd = (struct fill_dir_struct *) priv_data;
> - struct hash_entry *new_array, *ent;
> + struct hash_entry *ent;
> struct ext2_dir_entry *dirent;
> char *dir;
> unsigned int offset, dir_offset, rec_len, name_len;
> --
> 2.21.3
>


Cheers, Andreas






Attachments:
signature.asc (890.00 B)
Message signed with OpenPGP

2020-06-05 20:39:04

by Andreas Dilger

[permalink] [raw]
Subject: Re: [PATCH 1/4] e2fsck: remove unused variable 'new_array'


> On Jun 5, 2020, at 2:14 AM, Lukas Czerner <[email protected]> wrote:
>
> Signed-off-by: Lukas Czerner <[email protected]>
> ---
> e2fsck/rehash.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/e2fsck/rehash.c b/e2fsck/rehash.c
> index 1616d07a..b356b92d 100644
> --- a/e2fsck/rehash.c
> +++ b/e2fsck/rehash.c
> @@ -109,7 +109,7 @@ static int fill_dir_block(ext2_filsys fs,
> void *priv_data)
> {
> struct fill_dir_struct *fd = (struct fill_dir_struct *) priv_data;
> - struct hash_entry *new_array, *ent;
> + struct hash_entry *ent;

PS - there is a space before the tab after "hash_entry" that could be removed.
Ted could fix this when the patch is applied.

Cheers, Andreas






Attachments:
signature.asc (890.00 B)
Message signed with OpenPGP

2020-06-05 20:48:51

by Andreas Dilger

[permalink] [raw]
Subject: Re: [PATCH 4/4] ext2fs: remove unused variable 'left'

On Jun 5, 2020, at 2:14 AM, Lukas Czerner <[email protected]> wrote:
>
> Signed-off-by: Lukas Czerner <[email protected]>

Reviewed-by: Andreas Dilger <[email protected]>

> ---
> lib/ext2fs/swapfs.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c
> index 5b93b501..bc9f3230 100644
> --- a/lib/ext2fs/swapfs.c
> +++ b/lib/ext2fs/swapfs.c
> @@ -456,12 +456,11 @@ errcode_t ext2fs_dirent_swab_out2(ext2_filsys fs, char *buf,
> {
> errcode_t retval;
> char *p, *end;
> - unsigned int rec_len, left;
> + unsigned int rec_len;
> struct ext2_dir_entry *dirent;
>
> p = buf;
> end = buf + size;
> - left = size;
> while (p < end) {
> dirent = (struct ext2_dir_entry *) p;
> retval = ext2fs_get_rec_len(fs, dirent, &rec_len);
> --
> 2.21.3
>


Cheers, Andreas






Attachments:
signature.asc (890.00 B)
Message signed with OpenPGP

2020-09-22 12:38:19

by Lukas Czerner

[permalink] [raw]
Subject: Re: [PATCH 1/4] e2fsck: remove unused variable 'new_array'

On Fri, Jun 05, 2020 at 10:14:39AM +0200, Lukas Czerner wrote:
> Signed-off-by: Lukas Czerner <[email protected]>
> ---
> e2fsck/rehash.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/e2fsck/rehash.c b/e2fsck/rehash.c
> index 1616d07a..b356b92d 100644
> --- a/e2fsck/rehash.c
> +++ b/e2fsck/rehash.c
> @@ -109,7 +109,7 @@ static int fill_dir_block(ext2_filsys fs,
> void *priv_data)
> {
> struct fill_dir_struct *fd = (struct fill_dir_struct *) priv_data;
> - struct hash_entry *new_array, *ent;
> + struct hash_entry *ent;
> struct ext2_dir_entry *dirent;
> char *dir;
> unsigned int offset, dir_offset, rec_len, name_len;
> --
> 2.21.3
>

Ehm, ping ?

-Lukas

2020-10-01 20:45:44

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH 1/4] e2fsck: remove unused variable 'new_array'

Thanks, this was fixed already.

- Ted

2020-10-01 20:52:18

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH 4/4] ext2fs: remove unused variable 'left'

On Fri, Jun 05, 2020 at 10:14:42AM +0200, Lukas Czerner wrote:
> Signed-off-by: Lukas Czerner <[email protected]>

Thanks, applied.

- Ted