From ae0a8e73d2786f7d59f27d66ac6044d137174c5f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 17 Dec 2022 08:59:56 +0530 Subject: [PATCH] ... --- tools/tui/graphics/command.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/tui/graphics/command.go b/tools/tui/graphics/command.go index 32c0b34dd..1d7a5e21d 100644 --- a/tools/tui/graphics/command.go +++ b/tools/tui/graphics/command.go @@ -618,8 +618,7 @@ func set_val[T any](loc *T, parser func(string) (T, error), value string) (err e } func set_uval(loc *uint64, value string) (err error) { - var temp uint64 - temp, err = strconv.ParseUint(value, 10, 64) + temp, err := strconv.ParseUint(value, 10, 64) if err == nil { *loc = temp } @@ -627,8 +626,7 @@ func set_uval(loc *uint64, value string) (err error) { } func set_u32val(loc *uint32, value string) (err error) { - var temp uint64 - temp, err = strconv.ParseUint(value, 10, 64) + temp, err := strconv.ParseUint(value, 10, 32) if err == nil { *loc = uint32(temp) } @@ -636,8 +634,7 @@ func set_u32val(loc *uint32, value string) (err error) { } func set_i32val(loc *int32, value string) (err error) { - var temp int64 - temp, err = strconv.ParseInt(value, 10, 64) + temp, err := strconv.ParseInt(value, 10, 32) if err == nil { *loc = int32(temp) }