Skip to contentSkip to conversation

clean: remove unused variable buf

PATCH In review René Scharfe 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clean: remove unused variable buf

It had never been used.

---
 builtin/clean.c | 2 --
 1 file changed, 2 deletions(-)
builtin/clean.c +0 -2
index 98c103f..a9eb772 100644
@@ -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);
 }
 
Signature · 1 line
2.4.1
#1 lore raw

2015-05-20 6:13 GMT+08:00 René Scharfe <[email protected]>:

Quoted 1 line

It had never been used.

Confirmed. The unused "buf" should be removed.

Quoted 29 lines
---
 builtin/clean.c | 2 --
 1 file changed, 2 deletions(-)
builtin/clean.c +0 -3
index 98c103f..a9eb772 100644
@@ -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

Signature · 1 line
Jiang Xin