qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 02/16] qht: return existing entry when qht_inser


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 02/16] qht: return existing entry when qht_insert fails
Date: Wed, 28 Feb 2018 11:10:14 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/26/2018 09:39 PM, Emilio G. Cota wrote:
> The meaning of "existing" is now changed to "matches in hash and
> ht->cmp result". This is saner than just checking the pointer value.
> 
> Note that we now return NULL on insertion success, or the existing
> pointer on failure. We can do this because NULL pointers are not
> allowed to be inserted in QHT.
> 
> Suggested-by: Richard Henderson <address@hidden>
> Signed-off-by: Emilio G. Cota <address@hidden>
> ---
>  include/qemu/qht.h |  7 ++++---
>  tests/qht-bench.c  |  4 ++--
>  tests/test-qht.c   |  5 ++++-
>  util/qht.c         | 17 +++++++++--------
>  4 files changed, 19 insertions(+), 14 deletions(-)

Reviewed-by: Richard Henderson <address@hidden>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]