Thread (227 messages) 227 messages, 10 authors, 2019-01-07

Re: [PATCH v15 13/27] bisect--helper: `bisect_start` shell function partially in C

From: Stephan Beyer <hidden>
Date: 2016-11-20 20:20:03

On 11/20/2016 09:01 PM, Stephan Beyer wrote:
First, replace the current set_terms() by

static void set_terms(struct bisect_terms *terms, const char *bad,
                                                 const char *good)
{
	terms->term_good = xstrdup(good);
	terms->term_bad = xstrdup(bad);
}

ie, without calling write_terms(...).
I did not want to confuse you here but I forgot to mention that there
should also be freeing code, i.e. initialize your terms to NULL in the
beginning of cmd_builtin__helper, and always free them if it is not
null. This freeing code could also be in an extra function free_terms()
and you call it in set_terms() and for cleanup in the end.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help