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

Jonathon Jongsma jjongsma at redhat.com
Thu Dec 3 12:04:28 PST 2015


On Thu, 2015-12-03 at 16:45 +0000, Frediano Ziglio wrote:
> 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;

Acked-by: Jonathon Jongsma <jjongsma at redhat.com>


More information about the Spice-devel mailing list