remove ecb parameter from xdi_diff_outf()
xdi_diff_outf() overrides the structure members of its last parameter, ignoring any value that callers pass in. It's no surprise then that all callers pass a pointer to an uninitialized structure. They also don't read it after the call, so the parameter is neither used for input nor for output. Turn it into a local variable of xdi_diff_outf(). Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
ed215b109f
commit
dfea79004c
@ -211,7 +211,6 @@ static void combine_diff(const unsigned char *parent, unsigned int mode,
|
||||
xpparam_t xpp;
|
||||
xdemitconf_t xecfg;
|
||||
mmfile_t parent_file;
|
||||
xdemitcb_t ecb;
|
||||
struct combine_diff_state state;
|
||||
unsigned long sz;
|
||||
|
||||
@ -231,7 +230,7 @@ static void combine_diff(const unsigned char *parent, unsigned int mode,
|
||||
state.n = n;
|
||||
|
||||
xdi_diff_outf(&parent_file, result_file, consume_line, &state,
|
||||
&xpp, &xecfg, &ecb);
|
||||
&xpp, &xecfg);
|
||||
free(parent_file.ptr);
|
||||
|
||||
/* Assign line numbers for this parent.
|
||||
|
Reference in New Issue
Block a user