On 11 July 2017 at 18:15, Marc-André Lureau <marcandre.lur...@redhat.com> wrote:
>> @@ -793,7 +793,7 @@ void qdev_property_add_static(DeviceState *dev, Property
>> *prop,
>>                                      prop->info->description,
>>                                      &error_abort);
>>
>> -    if (prop->info->set_default_value) {
>> +    if (prop->set_default) {
>
> Not sure if it's worth to have an assert(prop->info->set_default_value), 
> probably not necessary.
>
>>          prop->info->set_default_value(obj, prop);

Yes, we'll just segfault on the NULL pointer immediately anyway.
I tend to the view that assertions are for turning obscure
and delayed failures into clearer and more immediate
failures, and in this case the failure is already pretty
clear and immediate.

thanks
-- PMM

Reply via email to