diff mbox series

[4/4] ext2fs: remove unused variable 'left'

Message ID 20200605081442.13428-4-lczerner@redhat.com
State New
Headers show
Series [1/4] e2fsck: remove unused variable 'new_array' | expand

Commit Message

Lukas Czerner June 5, 2020, 8:14 a.m. UTC
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
 lib/ext2fs/swapfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Andreas Dilger June 5, 2020, 8:48 p.m. UTC | #1
On Jun 5, 2020, at 2:14 AM, Lukas Czerner <lczerner@redhat.com> wrote:
> 
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>

Reviewed-by: Andreas Dilger <adilger@dilger.ca>

> ---
> 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
diff mbox series

Patch

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);