From 14512fa0246406e333ce173ca97b36aad361c305 Mon Sep 17 00:00:00 2001 From: Mitali Paygude Date: Tue, 26 Sep 2023 23:48:29 -0700 Subject: [PATCH] Correct conversion between integer types (#6736) --- internal/pkg/api/nutanix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pkg/api/nutanix.go b/internal/pkg/api/nutanix.go index 38258252cb9f..bae1ba638fce 100644 --- a/internal/pkg/api/nutanix.go +++ b/internal/pkg/api/nutanix.go @@ -51,7 +51,7 @@ func WithNutanixIntFromEnvVar(envVar string, opt func(int) NutanixFiller) Nutani // WithNutanixInt32FromEnvVar returns a NutanixFiller that sets the given int32 value to the given environment variable. func WithNutanixInt32FromEnvVar(envVar string, opt func(int32) NutanixFiller) NutanixFiller { - intVar, _ := strconv.Atoi(os.Getenv(envVar)) + intVar, _ := strconv.ParseInt(os.Getenv(envVar), 10, 32) return opt(int32(intVar)) }