From af16cfa90b04ffda668dfd98d73247d2e9499a2d Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Mon, 28 Sep 2015 22:59:39 -0700 Subject: [PATCH] variables: Misc cleanup / renaming --- proc/variables.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/proc/variables.go b/proc/variables.go index fabb96e1..c409afd0 100644 --- a/proc/variables.go +++ b/proc/variables.go @@ -342,11 +342,11 @@ func (scope *EvalScope) EvalVariable(name string) (*Variable, error) { // Sets the value of the named variable func (scope *EvalScope) SetVariable(name, value string) error { - addr, err := scope.ExtractVariableInfo(name) + v, err := scope.ExtractVariableInfo(name) if err != nil { return err } - return addr.setValue(value) + return v.setValue(value) } func (scope *EvalScope) extractVariableFromEntry(entry *dwarf.Entry) (*Variable, error) { @@ -922,8 +922,10 @@ func (v *Variable) readUint(size int64) (string, error) { } func (v *Variable) writeUint(signed bool, value string, size int64) error { - var n uint64 - var err error + var ( + n uint64 + err error + ) if signed { var m int64 m, err = strconv.ParseInt(value, 0, int(size*8))