Skip to content

Commit a361660

Browse files
peffgitster
authored andcommitted
xdiff: drop unused parameter in def_ff()
The def_ff() function is the default "find_func" for finding hunk headers. It has never used its "priv" argument since it was introduced in f258475 (Per-path attribute based hunk header selection., 2007-07-06). But back then we used a function pointer to switch between a caller-provided function and the default, so the two had to conform to the same interface. In ff2981f (xdiff: factor out match_func_rec(), 2016-05-28), that pointer indirection went away in favor of code which directly calls either of the two functions. So there's no need for def_ff() to retain this unused parameter. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c5224f0 commit a361660

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xdiff/xemit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ xdchange_t *xdl_get_hunk(xdchange_t **xscr, xdemitconf_t const *xecfg)
9595
}
9696

9797

98-
static long def_ff(const char *rec, long len, char *buf, long sz, void *priv)
98+
static long def_ff(const char *rec, long len, char *buf, long sz)
9999
{
100100
if (len > 0 &&
101101
(isalpha((unsigned char)*rec) || /* identifier? */
@@ -117,7 +117,7 @@ static long match_func_rec(xdfile_t *xdf, xdemitconf_t const *xecfg, long ri,
117117
const char *rec;
118118
long len = xdl_get_rec(xdf, ri, &rec);
119119
if (!xecfg->find_func)
120-
return def_ff(rec, len, buf, sz, xecfg->find_func_priv);
120+
return def_ff(rec, len, buf, sz);
121121
return xecfg->find_func(rec, len, buf, sz, xecfg->find_func_priv);
122122
}
123123

0 commit comments

Comments
 (0)