diff options
author | Jeff King <peff@peff.net> | 2017-04-21 00:09:35 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-21 07:04:34 +0300 |
commit | 16d2676c9ee996208277772fdf81dda212355440 (patch) | |
tree | 74af8cd55456aa59bcc75fe4bfa715583461bc48 /bisect.c | |
parent | 8c2ca3a6d6d0bf51332f92d25b7902f9943aaaf2 (diff) |
am: drop "dir" parameter from am_state_init
The only caller of this function passes in a static buffer
returned from git_path(). This looks dangerous at first
glance, but turns out to be OK because the first thing we do
is xstrdup() the result.
Let's turn this into a git_pathdup(). That's slightly more
efficient (no extra copy), and makes it easier to audit for
dangerous git_path() invocations.
Since there's only a single caller, let's just set this
default path inside the init function. That makes the memory
ownership clear.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bisect.c')
0 files changed, 0 insertions, 0 deletions