diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-04-12 19:15:24 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-05-11 05:47:31 +0200 |
commit | a8d5eb6dc0d61625667b0d8155c425d3629baa12 (patch) | |
tree | cc6c90e47a90860c813c289b1bdba90826f80dd9 /xdiff-interface.c | |
parent | pickaxe -S: slightly optimize contains() (diff) | |
download | git-a8d5eb6dc0d61625667b0d8155c425d3629baa12.tar.xz git-a8d5eb6dc0d61625667b0d8155c425d3629baa12.zip |
xdiff-interface: prepare for allowing early return
Change the function prototype of xdiff_emit_line_fn to return an "int"
instead of "void". Change all of those functions to "return 0",
nothing checks those return values yet, and no behavior is being
changed.
In subsequent commits the interface will be changed to allow early
return via this new return value.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'xdiff-interface.c')
-rw-r--r-- | xdiff-interface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xdiff-interface.c b/xdiff-interface.c index 4d20069302..5d8c8c67dc 100644 --- a/xdiff-interface.c +++ b/xdiff-interface.c @@ -31,7 +31,7 @@ static int xdiff_out_hunk(void *priv_, return 0; } -static void consume_one(void *priv_, char *s, unsigned long size) +static int consume_one(void *priv_, char *s, unsigned long size) { struct xdiff_emit_state *priv = priv_; char *ep; @@ -43,6 +43,7 @@ static void consume_one(void *priv_, char *s, unsigned long size) size -= this_size; s += this_size; } + return 0; } static int xdiff_outf(void *priv_, mmbuffer_t *mb, int nbuf) |