Re: [PATCH v2 7/8] libmpathutil: remove vector_repack()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 07, 2025 at 09:05:51PM +0200, Martin Wilck wrote:
> This function is unused, and its implementation looks odd.
> Remove it.
> 
> Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>

Reviewed-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>

> ---
>  libmpathutil/vector.c | 13 -------------
>  libmpathutil/vector.h |  1 -
>  2 files changed, 14 deletions(-)
> 
> diff --git a/libmpathutil/vector.c b/libmpathutil/vector.c
> index f69d644..6ad5dd5 100644
> --- a/libmpathutil/vector.c
> +++ b/libmpathutil/vector.c
> @@ -138,19 +138,6 @@ vector_del_slot(vector v, int slot)
>  	}
>  }
>  
> -void
> -vector_repack(vector v)
> -{
> -	int i;
> -
> -	if (!v || !v->allocated)
> -		return;
> -
> -	for (i = 0; i < VECTOR_SIZE(v); i++)
> -		if (i > 0 && v->slot[i] == NULL)
> -			vector_del_slot(v, i--);
> -}
> -
>  vector
>  vector_reset(vector v)
>  {
> diff --git a/libmpathutil/vector.h b/libmpathutil/vector.h
> index 85127ad..171ab6a 100644
> --- a/libmpathutil/vector.h
> +++ b/libmpathutil/vector.h
> @@ -86,7 +86,6 @@ extern void vector_del_slot(vector v, int slot);
>  extern void *vector_insert_slot(vector v, int slot, void *value);
>  int find_slot(vector v, const void *addr);
>  int vector_find_or_add_slot(vector v, void *value);
> -extern void vector_repack(vector v);
>  extern void vector_dump(vector v);
>  extern void dump_strvec(vector strvec);
>  extern int vector_move_up(vector v, int src, int dest);
> -- 
> 2.49.0





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux