mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
write_name{_quoted_relative,}(): remove redundant parameters
After substitute path_relative() in quote.c with relative_path() from path.c, parameters (such as len and prefix_len) are redundant in function write_name() and write_name_quoted_relative(). The callers have already been audited that the strings they pass are properly NUL terminated and the length they give are the length of the string (or -1 that asks the length to be counted by the callee). Remove these now-redundant parameters. Signed-off-by: Jiang Xin <worldhello.net@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
39598f9983
commit
e9a820cefd
3
quote.c
3
quote.c
@@ -312,8 +312,7 @@ void write_name_quotedpfx(const char *pfx, size_t pfxlen,
|
||||
fputc(terminator, fp);
|
||||
}
|
||||
|
||||
void write_name_quoted_relative(const char *name, size_t len,
|
||||
const char *prefix, size_t prefix_len,
|
||||
void write_name_quoted_relative(const char *name, const char *prefix,
|
||||
FILE *fp, int terminator)
|
||||
{
|
||||
struct strbuf sb = STRBUF_INIT;
|
||||
|
||||
Reference in New Issue
Block a user