Skip to contentSkip to conversation

fix xc_domain_memory_increase_reservation return value

PATCH New Xiaofeng Ling 1 participant 1 message Jun 29, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix xc_domain_memory_increase_reservation return value

in xc_domain_memory_increase_reservation, when do_dom_mem_op return 0, it shall also return -1,I met this problem when I try to allocate domain memory.

tools/libxc/xc_domain.c 2005-06-29 17:16:11 +08:00 +1 -1
diff -Nru a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
@@ -243,7 +243,7 @@
     if (err == mem_kb / 4)
         return 0;
 
-    if (err > 0) {
+    if (err >= 0) {
         errno = ENOMEM;
         err = -1;
     }