[Spice-devel] [PATCH] memslot: change some spice_assert to spice_return_if_fail

Frediano Ziglio fziglio at redhat.com
Thu Dec 3 08:45:11 PST 2015


Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/red_memslots.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/red_memslots.c b/server/red_memslots.c
index 2fd939e..e883c54 100644
--- a/server/red_memslots.c
+++ b/server/red_memslots.c
@@ -168,8 +168,8 @@ void memslot_info_add_slot(RedMemSlotInfo *info, uint32_t slot_group_id, uint32_
 
 void memslot_info_del_slot(RedMemSlotInfo *info, uint32_t slot_group_id, uint32_t slot_id)
 {
-    spice_assert(info->num_memslots_groups > slot_group_id);
-    spice_assert(info->num_memslots > slot_id);
+    spice_return_if_fail(info->num_memslots_groups > slot_group_id);
+    spice_return_if_fail(info->num_memslots > slot_id);
 
     info->mem_slots[slot_group_id][slot_id].virt_start_addr = 0;
     info->mem_slots[slot_group_id][slot_id].virt_end_addr = 0;
-- 
2.4.3



More information about the Spice-devel mailing list