[prev in list] [next in list] [prev in thread] [next in thread]
List: xen-devel
Subject: [Xen-devel] [PATCH] minios xc_evtchn_unbind missing return
From: Diego Ongaro <diego.ongaro () citrix ! com>
Date: 2008-07-31 23:48:19
Message-ID: 48924F43.8060805 () citrix ! com
[Download RAW message or body]
minios: Error case when unbinding unknown port in xc_evtchn_unbind is
missing a return statement.
Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com>
---
diff --git a/tools/libxc/xc_minios.c b/tools/libxc/xc_minios.c
--- a/tools/libxc/xc_minios.c
+++ b/tools/libxc/xc_minios.c
@@ -259,8 +259,11 @@ int xc_evtchn_unbind(int xce_handle, evt
files[xce_handle].evtchn.ports[i].port = -1;
break;
}
- if (i == MAX_EVTCHN_PORTS)
+ if (i == MAX_EVTCHN_PORTS) {
printf("Warning: couldn't find port %"PRId32" for xc handle %x\n", port, xce_handle);
+ errno = -EINVAL;
+ return -1;
+ }
files[xce_handle].evtchn.ports[i].bound = 0;
unbind_evtchn(port);
return 0;
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic