On 08/13/2012 01:13 PM, Eric Blake wrote:
On 08/13/2012 10:33 AM, Corey Bryant wrote:
The only way it could fail is if we are trying to add an fd that is
already in the set, or if we don't find mon_fdset; both of which would
indicate logic bugs earlier in our program. Would it be worth asserting
that these conditions are impossible, and making this function return
void (the addition is always successful if it returns, since g_malloc0
aborts rather than failing with ENOMEM)?
I think what I did in v10 should suffice. I didn't update
monitor_fdset_dup_fd_add(), but I did update the calling code. If the
call fails then I set errno to EINVAL since (unless there's a bug) the
only possible error is that the fdset ID was non-existent.
It makes sense to add the asserts, but at this point I'd like to stick
with what we have in v10 if that's ok.
The problems of reading my inbox in FIFO order - I see now that v10
landed before my comments on v9 :) Yes, what you did in v10 is probably
fine.
Heh. Well thanks again for the thorough review. If you have any other
comments on the code let me know. But hopefully we're all set at this
point and can make it into QEMU 1.2.
--
Regards,
Corey
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list