On 05/18/2015 10:42 AM, Stefan Hajnoczi wrote:
> On Mon, May 11, 2015 at 07:04:23PM -0400, John Snow wrote:
>> @@ -2900,9 +2917,16 @@ void qmp_drive_backup(const char *device,
>> const char *target, } }
>>
>> + /* If we are not supplied with callback override info, use
>> our defaults */ + if (cb == NULL) { + cb =
>> block_job_cb; + } + if (opaque == NULL) { + opaque =
>> bs; + }
>
> Why assign opaque separately, it raises the question what happens
> if a custom cb is given but the caller really wants opaque to be
> NULL?
>
> The following might be clearer:
>
> if (cb == NULL) { cb = block_job_cb; opaque = bs; }
>
It just wasn't a consideration when I was writing it, since the
transaction system won't ever want to pass NULL here.
It's easy enough to fix, though.