]> git.ipfire.org Git - thirdparty/git.git/commit
gc: remove unused launchctl_get_uid() call
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sun, 12 Sep 2021 00:24:40 +0000 (02:24 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 12 Sep 2021 23:47:18 +0000 (16:47 -0700)
commit3218cb753f5a2a49808bf07f039051e7b79b8f44
treeb1f15cb44ce8b47d6e99cc1557c9a4ee8a4346ab
parent8b7c11b8668b4e774f81a9f0b4c30144b818f1d1
gc: remove unused launchctl_get_uid() call

When the launchctl_boot_plist() function was added in
a16eb6b1ff3 (maintenance: skip bootout/bootstrap when plist is
registered, 2021-08-24), an unused call to launchctl_get_uid() was
added along with it. That call appears to have been copy/pasted from
launchctl_boot_plist().

Since we can remove that, we can also get rid of the "result"
variable, whose only purpose was allow for the free() between its
assignment and the return. That pattern also appears to have been
copy/pasted from launchctl_boot_plist().

As the patch shows the returned value from launchctl_get_uid() wasn't
used at all in this function. The launchctl_get_uid() function itself
just calls xstrfmt() and getuid(), neither of which have any subtle
global side-effects, so this removal is safe.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/gc.c