Am 12.10.2018 um 14:28 hat Max Reitz geschrieben:
> >>> @@ -1155,8 +1155,7 @@ static void default_drive(int enable, int snapshot, 
> >>> BlockInterfaceType type,
> >>>          drive_enable_snapshot(NULL, opts, NULL);
> >>>      }
> >>>  
> >>> -    dinfo = drive_new(opts, type);
> >>> -    assert(dinfo);
> >>> +    dinfo = drive_new(opts, type, &error_abort);
> >>
> >> Which means the assertion is still necessary here.
> > 
> > I see very little value in assert(p) right before *p.  Matter of taste,
> > I guess.  Do you want me to keep it?
> 
> True.  "An assertion looks better to the user" isn't an argument,
> considering the user shouldn't ever see assertions either.

The point that could be made is that it documents that we're aware that
drive_new() can return NULL generally, but we've made sure that with the
specific options passed it doesn't happen here, so not having any error
handling is not a bug, but intended.

> So feel free to drop it indeed.

I don't mind either way.

Kevin

Attachment: signature.asc
Description: PGP signature

Reply via email to