Skip to content

Commit 40487c7

Browse files
committed
remove redundant else
1 parent 664c581 commit 40487c7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/os/exec_linux.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@ func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error)
6262

6363
if err != nil {
6464
return 0, err
65-
} else {
66-
// else code runs in child, which then should exec the new process
67-
err = execve(argv0, argv, attr.Env)
68-
if err != nil {
69-
// exec failed
70-
return 0, err
71-
}
72-
// 3. TODO: use pipes to communicate back child status
73-
return pid, nil
7465
}
66+
67+
// else code runs in child, which then should exec the new process
68+
err = execve(argv0, argv, attr.Env)
69+
if err != nil {
70+
// exec failed
71+
return 0, err
72+
}
73+
// 3. TODO: use pipes to communicate back child status
74+
return pid, nil
7575
}
7676

7777
// In Golang, the idiomatic way to create a new process is to use the StartProcess function.

0 commit comments

Comments
 (0)