summaryrefslogtreecommitdiff
path: root/trailer.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-02-14 18:59:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-22 18:08:05 (GMT)
commit31c2c7a0ce2b0bd788d1cf7e1f0d14fad8132a7f (patch)
tree8a3b94510de6e1631a062bd98483501fd7a70054 /trailer.c
parentea8ace4ad375d276235aa852e243c27f77ab8521 (diff)
downloadgit-31c2c7a0ce2b0bd788d1cf7e1f0d14fad8132a7f.zip
git-31c2c7a0ce2b0bd788d1cf7e1f0d14fad8132a7f.tar.gz
git-31c2c7a0ce2b0bd788d1cf7e1f0d14fad8132a7f.tar.bz2
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 <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'trailer.c')
-rw-r--r--trailer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/trailer.c b/trailer.c
index 5a4a2ec..c508c9b 100644
--- a/trailer.c
+++ b/trailer.c
@@ -1000,7 +1000,7 @@ static struct tempfile *trailers_tempfile;
static FILE *create_in_place_tempfile(const char *file)
{
struct stat st;
- struct strbuf template = STRBUF_INIT;
+ struct strbuf filename_template = STRBUF_INIT;
const char *tail;
FILE *outfile;
@@ -1014,11 +1014,11 @@ static FILE *create_in_place_tempfile(const char *file)
/* Create temporary file in the same directory as the original */
tail = strrchr(file, '/');
if (tail != NULL)
- strbuf_add(&template, file, tail - file + 1);
- strbuf_addstr(&template, "git-interpret-trailers-XXXXXX");
+ strbuf_add(&filename_template, file, tail - file + 1);
+ strbuf_addstr(&filename_template, "git-interpret-trailers-XXXXXX");
- trailers_tempfile = xmks_tempfile_m(template.buf, st.st_mode);
- strbuf_release(&template);
+ trailers_tempfile = xmks_tempfile_m(filename_template.buf, st.st_mode);
+ strbuf_release(&filename_template);
outfile = fdopen_tempfile(trailers_tempfile, "w");
if (!outfile)
die_errno(_("could not open temporary file"));