golang/xenlight: do not negate ret when converting to Error
authorNick Rosbrook <rosbrookn@gmail.com>
Mon, 24 May 2021 20:36:52 +0000 (16:36 -0400)
committerGeorge Dunlap <george.dunlap@citrix.com>
Mon, 21 Jun 2021 15:49:08 +0000 (16:49 +0100)
commitc9b59f9032d41be8bade8a25d9148cf6ed203704
tree67483f37e8c8533e6c5197a5c265e36022249b38
parent1d95fd75df18bf25cb445feb47caf62da25c00e8
golang/xenlight: do not negate ret when converting to Error

Commit 871e51d2d4 changed the sign on the xenlight error types (making
the values negative, same as the C-generated constants), but failed to
remove the code changing the sign before casting to Error().  This
results in error strings like "libxl error: <x>", rather than the
correct message. Fix all occurrances of this by running:

  gofmt -w -r 'Error(-ret) -> Error(ret)' xenlight.go

from tools/golang/xenlight.

Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
tools/golang/xenlight/xenlight.go