aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2019-09-25 16:25:10 -0400
committerNalin Dahyabhai <nalin@redhat.com>2019-09-26 18:19:07 -0400
commit65b20bd521302020ff229d455c60102e15a41b8a (patch)
treec378d118a2661cb619715a425b8deec3e4f4c993 /contrib
parent851e3775d5d2e605bcb612054a94ac6de005f834 (diff)
downloadpodman-65b20bd521302020ff229d455c60102e15a41b8a.tar.gz
podman-65b20bd521302020ff229d455c60102e15a41b8a.tar.bz2
podman-65b20bd521302020ff229d455c60102e15a41b8a.zip
Correct use of reexec.Init()
A true result from reexec.Init() isn't an error, but it indicates that main() should exit with a success exit status. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/perftest/main.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/perftest/main.go b/contrib/perftest/main.go
index f6c90914a..9b928a6b3 100644
--- a/contrib/perftest/main.go
+++ b/contrib/perftest/main.go
@@ -36,6 +36,9 @@ var helpMessage = `
`
func main() {
+ if reexec.Init() {
+ return
+ }
ctx := context.Background()
imageName := ""
@@ -51,10 +54,6 @@ func main() {
flag.Parse()
- if reexec.Init() {
- return
- }
-
switch strings.ToLower(*logLevel) {
case "error":
logrus.SetLevel(logrus.ErrorLevel)