Re: [Qemu-devel] [PATCH v5 5/5] qobject: modify qobject_ref() to assert on NULL

2018-04-19 Thread Marc-André Lureau
Hi On Thu, Apr 19, 2018 at 8:18 AM, Markus Armbruster wrote: > Marc-André Lureau writes: > >> While it may be convenient to accept NULL value in >> qobject_unref() (for similar reasons as free() accepts NULL), it is >> not such a good idea for qobject_ref(), assert() on NULL. One place >> relied

Re: [Qemu-devel] [PATCH v5 5/5] qobject: modify qobject_ref() to assert on NULL

2018-04-18 Thread Markus Armbruster
Marc-André Lureau writes: > While it may be convenient to accept NULL value in > qobject_unref() (for similar reasons as free() accepts NULL), it is > not such a good idea for qobject_ref(), assert() on NULL. One place > relied on that behaviour (the monitor request id), and it's best to be > exp

Re: [Qemu-devel] [PATCH v5 5/5] qobject: modify qobject_ref() to assert on NULL

2018-04-17 Thread Eric Blake
On 04/17/2018 08:36 AM, Marc-André Lureau wrote: > While it may be convenient to accept NULL value in > qobject_unref() (for similar reasons as free() accepts NULL), it is > not such a good idea for qobject_ref(), assert() on NULL. One place > relied on that behaviour (the monitor request id), and

[Qemu-devel] [PATCH v5 5/5] qobject: modify qobject_ref() to assert on NULL

2018-04-17 Thread Marc-André Lureau
While it may be convenient to accept NULL value in qobject_unref() (for similar reasons as free() accepts NULL), it is not such a good idea for qobject_ref(), assert() on NULL. One place relied on that behaviour (the monitor request id), and it's best to be explicit that NULL is accepted there. Si