|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] golang/xenlight: add error return type to Context.Cpupoolinfo
commit 7aac825058ee6c8f3179d7114af9263d047800b6
Author: Nick Rosbrook <rosbrookn@xxxxxxxxx>
AuthorDate: Mon Dec 23 10:17:07 2019 -0500
Commit: George Dunlap <george.dunlap@xxxxxxxxxx>
CommitDate: Tue Dec 24 09:52:12 2019 +0000
golang/xenlight: add error return type to Context.Cpupoolinfo
A previous commit that removed Context.CheckOpen revealed
an ineffectual assignent to err in Context.Cpupoolinfo, as
there is no error return type.
Since it appears that the intent is to return an error here,
add an error return value to the function signature.
Signed-off-by: Nick Rosbrook <rosbrookn@xxxxxxxxxxxx>
Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx>
---
tools/golang/xenlight/xenlight.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/golang/xenlight/xenlight.go
b/tools/golang/xenlight/xenlight.go
index 5f14cab6ce..237f26bce9 100644
--- a/tools/golang/xenlight/xenlight.go
+++ b/tools/golang/xenlight/xenlight.go
@@ -504,17 +504,17 @@ func (Ctx *Context) ListCpupool() (list []Cpupoolinfo) {
}
// int libxl_cpupool_info(libxl_ctx *ctx, libxl_cpupoolinfo *info, uint32_t
poolid);
-func (Ctx *Context) CpupoolInfo(Poolid uint32) (pool Cpupoolinfo) {
+func (Ctx *Context) CpupoolInfo(Poolid uint32) (pool Cpupoolinfo, err error) {
var c_cpupool C.libxl_cpupoolinfo
ret := C.libxl_cpupool_info(Ctx.ctx, &c_cpupool, C.uint32_t(Poolid))
if ret != 0 {
- //err = Error(-ret)
+ err = Error(-ret)
return
}
defer C.libxl_cpupoolinfo_dispose(&c_cpupool)
- _ = pool.fromC(&c_cpupool)
+ err = pool.fromC(&c_cpupool)
return
}
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |