On Wed, May 17, 2023 at 11:06:55AM +0100, Richard W.M. Jones wrote:
> This replaces the existing ad hoc parsing with the new public function.
> ---
> filters/error/nbdkit-error-filter.pod | 12 +++++++-----
> filters/error/error.c | 14 +-------------
> 2 files changed, 8 insertions(+), 18 deletions(-)
>
> + if (nbdkit_parse_probability (key, value, &d) == -1)
> return -1;
> - }
> if (d < 0 || d > 1) {
If you change nbdkit_parse_probability() based on my comments to patch
1 to guarantee a non-negative value in d on success, then then left
half of this conditional would now be dead code.
Otherwise,
Reviewed-by: Eric Blake <[email protected]>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
_______________________________________________
Libguestfs mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/libguestfs