[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: |
Emilio G. Cota |
Subject: |
Re: [Qemu-devel] [PATCH 02/16] qht: return existing entry when qht_insert fails |
Date: |
Thu, 5 Apr 2018 13:10:54 -0400 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Wed, Mar 28, 2018 at 17:33:09 +0100, Alex Bennée wrote:
> Emilio G. Cota <address@hidden> writes:
> > -bool qht_insert(struct qht *ht, void *p, uint32_t hash);
> > +void *qht_insert(struct qht *ht, void *p, uint32_t hash);
>
> Hmm this seems needlessly counter intuitive. I realise the potential
> efficiency in overloading success/fail but wouldn't a:
>
> bool qht_insert(struct qht *ht, void *p, uint32_t hash, void **existing);
>
> be conceptually nicer?
Good point, fixed in v2.
Thanks,
E.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH 02/16] qht: return existing entry when qht_insert fails,
Emilio G. Cota <=