Greg Kurz <gr...@kaod.org> writes: > On Fri, 11 Sep 2020 07:30:37 +0200 > Markus Armbruster <arm...@redhat.com> wrote: [...] >> No, the patch is okay as is. >> >> Dumbing it down to keep it simple would also be okay. >> > > What about Ari's proposal to add ERRP_GUARD() and check errors > with "if (*errp)" like we do for void functions ?
Up to the maintainer. I prefer this patch. >> Regarding the proposed assertion: do we protect similar conversions from >> over-wide negative errno int elsewhere? >> > > We do protect int64_t->int conversions in a few places, eg. > qcow2_write_snapshots() or qemu_spice_create_host_primary(), > but I couldn't find one about a negarive errno. Then I'd not protect it here, either. >> >>> goto fail_log; >> >>> } >> >>> >> >>> + s->cur_log_sector = cur_log_sector; >> >>> s->nr_entries = le64_to_cpu(log_sb.nr_entries); >> >>> } >> >>> } else { >>