Il 14/02/2014 17:45, Kevin Wolf ha scritto:
> - ret = bdrv_file_open(&cow_bs, filename, NULL, NULL, BDRV_O_RDWR,
> - &local_err);
> + ret = bdrv_file_open(&cow_bs, filename, NULL, NULL, BDRV_O_RDWR, errp);
> if (ret < 0) {
> - qerror_report_err(local_err);
> - error_free(local_err);
> return ret;
> }
This is technically correct, but I think general policy is that using
the local_err pattern is preferred anyway.
I think only for void-returning functions. I checked callers of
monitor_get_fd and they use this pattern, even if they pass &local_err
instead of errp.
Paolo