summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-09-23 13:44:46 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-23 13:44:46 -0700
commitb5866edf97c19bea2b0557beeaec4223ad54e202 (patch)
treeffb375221f59cd4b90bff62c90647ce5209cc331 /builtin
parentMerge branch 'ab/test-tool-run-command-cleanup' (diff)
parentgc: remove unused launchctl_get_uid() call (diff)
downloadtgif-b5866edf97c19bea2b0557beeaec4223ad54e202.tar.xz
Merge branch 'ab/gc-remove-unused-call'
Code clean-up. * ab/gc-remove-unused-call: gc: remove unused launchctl_get_uid() call
Diffstat (limited to 'builtin')
-rw-r--r--builtin/gc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/builtin/gc.c b/builtin/gc.c
index b00b396f55..6b3de3dd51 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -1681,9 +1681,7 @@ static int launchctl_remove_plists(void)
static int launchctl_list_contains_plist(const char *name, const char *cmd)
{
- int result;
struct child_process child = CHILD_PROCESS_INIT;
- char *uid = launchctl_get_uid();
strvec_split(&child.args, cmd);
strvec_pushl(&child.args, "list", name, NULL);
@@ -1694,12 +1692,8 @@ static int launchctl_list_contains_plist(const char *name, const char *cmd)
if (start_command(&child))
die(_("failed to start launchctl"));
- result = finish_command(&child);
-
- free(uid);
-
/* Returns failure if 'name' doesn't exist. */
- return !result;
+ return !finish_command(&child);
}
static int launchctl_schedule_plist(const char *exec_path, enum schedule_priority schedule)