aboutsummaryrefslogtreecommitdiffstats
path: root/commit.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2018-02-09 20:32:00 +0000
committerJunio C Hamano <gitster@pobox.com>2018-02-09 13:10:11 -0800
commitaa59e0eaf65b1e535248f67822053e3b2f5fcc26 (patch)
tree8c8885e040a06e5fe83aa53229382c9106ee6bd0 /commit.c
parentGit 2.16.1 (diff)
downloadgit-aa59e0eaf65b1e535248f67822053e3b2f5fcc26.tar.gz
git-aa59e0eaf65b1e535248f67822053e3b2f5fcc26.zip
fetch: don't redundantly NULL something calloc() gave us
Stop redundantly NULL-ing the last element of the refs structure, which was retrieved via calloc(), and is thus guaranteed to be pre-NULL'd. This code dates back to b888d61c83 ("Make fetch a builtin", 2007-09-10), where wasn't any reason to do this back then either, it's just boilerplate left over from when git-fetch was initially introduced. The motivation for this change was to make a subsequent change which would also modify the refs variable smaller, since it won't have to copy this redundant "NULL the last + 1 item" pattern. We may not end up keeping that change, but as this pattern is still pointless, so let's fix it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions