diff --git a/caddy.go b/caddy.go index 902a1a39..4c1cbb0f 100644 --- a/caddy.go +++ b/caddy.go @@ -565,12 +565,7 @@ func ValidateAndExecuteDirectives(cdyfile Input, inst *Instance, justValidate bo return err } - err = executeDirectives(inst, cdyfile.Path(), stype.Directives(), sblocks, justValidate) - if err != nil { - return err - } - - return nil + return executeDirectives(inst, cdyfile.Path(), stype.Directives(), sblocks, justValidate) } func executeDirectives(inst *Instance, filename string, diff --git a/sigtrap_posix.go b/sigtrap_posix.go index 0715b328..71b6969a 100644 --- a/sigtrap_posix.go +++ b/sigtrap_posix.go @@ -84,7 +84,7 @@ func trapSignalsPosix() { } // Kick off the restart; our work is done - inst, err = inst.Restart(caddyfileToUse) + _, err = inst.Restart(caddyfileToUse) if err != nil { log.Printf("[ERROR] SIGUSR1: %v", err) } diff --git a/upgrade.go b/upgrade.go index 9a607ef2..5e9f1558 100644 --- a/upgrade.go +++ b/upgrade.go @@ -148,7 +148,7 @@ func Upgrade() error { // determine whether child startup succeeded answer, readErr := ioutil.ReadAll(sigrpipe) - if answer == nil || len(answer) == 0 { + if len(answer) == 0 { cmdErr := cmd.Wait() // get exit status errStr := fmt.Sprintf("child failed to initialize: %v", cmdErr) if readErr != nil {