# [PATCH] clean: remove unused variable buf

2 messages from 2015-05-19 to 2015-05-30. Participants: René Scharfe, Jiang Xin.
Thread: https://gitlist.dev/t/39375

## René Scharfe, 2015-05-19 22:13

Subject: [PATCH] clean: remove unused variable buf
Message-ID: <555BB586.8050503@web.de>
URL: https://gitlist.dev/e/555BB586.8050503%40web.de

```
It had never been used.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
---
 builtin/clean.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/builtin/clean.c b/builtin/clean.c
index 98c103f..a9eb772 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -314,7 +314,6 @@ static void print_highlight_menu_stuff(struct menu_stuff *stuff, int **chosen)
 {
 	struct string_list menu_list = STRING_LIST_INIT_DUP;
 	struct strbuf menu = STRBUF_INIT;
-	struct strbuf buf = STRBUF_INIT;
 	struct menu_item *menu_item;
 	struct string_list_item *string_list_item;
 	int i;
@@ -363,7 +362,6 @@ static void print_highlight_menu_stuff(struct menu_stuff *stuff, int **chosen)
 	pretty_print_menus(&menu_list);
 
 	strbuf_release(&menu);
-	strbuf_release(&buf);
 	string_list_clear(&menu_list, 0);
 }
 
-- 
2.4.1

```

## Jiang Xin, 2015-05-30 15:20

Subject: Re: [PATCH] clean: remove unused variable buf
Message-ID: <CANYiYbEYLGZ00RadktTvEY1cp97ZckkUz++dxi6X7FzyrSn2bg@mail.gmail.com>
URL: https://gitlist.dev/e/CANYiYbEYLGZ00RadktTvEY1cp97ZckkUz%2B%2Bdxi6X7FzyrSn2bg%40mail.gmail.com
In-Reply-To: <555BB586.8050503@web.de>

```
2015-05-20 6:13 GMT+08:00 René Scharfe <l.s.r@web.de>:
> It had never been used.

Confirmed. The unused "buf" should be removed.

>
> Signed-off-by: Rene Scharfe <l.s.r@web.de>
> ---
>  builtin/clean.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/builtin/clean.c b/builtin/clean.c
> index 98c103f..a9eb772 100644
> --- a/builtin/clean.c
> +++ b/builtin/clean.c
> @@ -314,7 +314,6 @@ static void print_highlight_menu_stuff(struct menu_stuff *stuff, int **chosen)
>  {
>         struct string_list menu_list = STRING_LIST_INIT_DUP;
>         struct strbuf menu = STRBUF_INIT;
> -       struct strbuf buf = STRBUF_INIT;
>         struct menu_item *menu_item;
>         struct string_list_item *string_list_item;
>         int i;
> @@ -363,7 +362,6 @@ static void print_highlight_menu_stuff(struct menu_stuff *stuff, int **chosen)
>         pretty_print_menus(&menu_list);
>
>         strbuf_release(&menu);
> -       strbuf_release(&buf);
>         string_list_clear(&menu_list, 0);
>  }
>
> --
> 2.4.1
>



-- 
Jiang Xin

```
