Skip to content

Commit 31c2c7a

Browse files
bmwillgitster
authored andcommitted
trailer: rename 'template' variables
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ea8ace4 commit 31c2c7a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

trailer.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ static struct tempfile *trailers_tempfile;
10001000
static FILE *create_in_place_tempfile(const char *file)
10011001
{
10021002
struct stat st;
1003-
struct strbuf template = STRBUF_INIT;
1003+
struct strbuf filename_template = STRBUF_INIT;
10041004
const char *tail;
10051005
FILE *outfile;
10061006

@@ -1014,11 +1014,11 @@ static FILE *create_in_place_tempfile(const char *file)
10141014
/* Create temporary file in the same directory as the original */
10151015
tail = strrchr(file, '/');
10161016
if (tail != NULL)
1017-
strbuf_add(&template, file, tail - file + 1);
1018-
strbuf_addstr(&template, "git-interpret-trailers-XXXXXX");
1017+
strbuf_add(&filename_template, file, tail - file + 1);
1018+
strbuf_addstr(&filename_template, "git-interpret-trailers-XXXXXX");
10191019

1020-
trailers_tempfile = xmks_tempfile_m(template.buf, st.st_mode);
1021-
strbuf_release(&template);
1020+
trailers_tempfile = xmks_tempfile_m(filename_template.buf, st.st_mode);
1021+
strbuf_release(&filename_template);
10221022
outfile = fdopen_tempfile(trailers_tempfile, "w");
10231023
if (!outfile)
10241024
die_errno(_("could not open temporary file"));

0 commit comments

Comments
 (0)