Marc-André Lureau writes:
> Hi
> On Fri, Aug 24, 2018 at 10:12 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_re
Hi
On Fri, Aug 24, 2018 at 3:24 PM Markus Armbruster wrote:
>
> Marc-André Lureau writes:
>
> > Hi
> > On Fri, Aug 24, 2018 at 10:12 AM Markus Armbruster
> > wrote:
> >>
> >> Marc-André Lureau writes:
> >>
> >> > While it may be convenient to accept NULL value in
> >> > qobject_unref() (for si
Hi
On Fri, Aug 24, 2018 at 10:12 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(): now assert() on NULL.
>
> Why is
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(): now assert() on NULL.
Why is it not such a good idea?
Is it unsafe? Unclean? Ugly?
If unsafe, can you
On Fri 17 Aug 2018 07:19:32 PM CEST, Marc-André Lureau wrote:
> diff --git a/block/quorum.c b/block/quorum.c
> index 9152da8c58..96cd094ede 100644
> --- a/block/quorum.c
> +++ b/block/quorum.c
> @@ -1089,7 +1089,8 @@ static void quorum_refresh_filename(BlockDriverState
> *bs, QDict *options)
>
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(): now assert() on NULL.
Some code relied on that behaviour, but it's best to be explicit that
NULL is accepted. We have to rely on testing,