The callee parse_choice() only needs to access a NUL-terminated
string; instead of insisting to take a pointer to a strbuf, just
take a pointer to a character array.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
*/
static int parse_choice(struct menu_stuff *menu_stuff,
int is_single,
- struct strbuf *input,
+ char *input,
int **chosen)
{
struct string_list choice = STRING_LIST_INIT_NODUP;
int nr = 0;
int i;
- string_list_split_in_place_f(&choice, input->buf,
+ string_list_split_in_place_f(&choice, input,
is_single ? "\n" : ", ", -1,
STRING_LIST_SPLIT_TRIM);
nr = parse_choice(stuff,
opts->flags & MENU_OPTS_SINGLETON,
- &choice,
+ choice.buf,
&chosen);
if (opts->flags & MENU_OPTS_SINGLETON) {