Skip to content

Commit b5866ed

Browse files
committed
Merge branch 'ab/gc-remove-unused-call'
Code clean-up. * ab/gc-remove-unused-call: gc: remove unused launchctl_get_uid() call
2 parents ffb0387 + 3218cb7 commit b5866ed

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

builtin/gc.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,9 +1681,7 @@ static int launchctl_remove_plists(void)
16811681

16821682
static int launchctl_list_contains_plist(const char *name, const char *cmd)
16831683
{
1684-
int result;
16851684
struct child_process child = CHILD_PROCESS_INIT;
1686-
char *uid = launchctl_get_uid();
16871685

16881686
strvec_split(&child.args, cmd);
16891687
strvec_pushl(&child.args, "list", name, NULL);
@@ -1694,12 +1692,8 @@ static int launchctl_list_contains_plist(const char *name, const char *cmd)
16941692
if (start_command(&child))
16951693
die(_("failed to start launchctl"));
16961694

1697-
result = finish_command(&child);
1698-
1699-
free(uid);
1700-
17011695
/* Returns failure if 'name' doesn't exist. */
1702-
return !result;
1696+
return !finish_command(&child);
17031697
}
17041698

17051699
static int launchctl_schedule_plist(const char *exec_path, enum schedule_priority schedule)

0 commit comments

Comments
 (0)