[Libguestfs] [PATCH libnbd v2 5/5] lib: Use unsigned for pread_structured status parameter.

Eric Blake eblake at redhat.com
Wed Jul 24 18:43:23 UTC 2019


On 7/24/19 11:54 AM, Richard W.M. Jones wrote:
> This is a bitmask so using an unsigned type is slightly safer.  This
> is not an ABI change since the types are compatible.
> 
> Thanks: Eric Blake.
> ---
>  examples/strict-structured-reads.c |  2 +-
>  generator/generator                | 67 ++++++++++++++++--------------
>  interop/structured-read.c          |  2 +-
>  lib/internal.h                     |  2 +-
>  tests/oldstyle.c                   |  2 +-
>  5 files changed, 39 insertions(+), 36 deletions(-)
> 

> @@ -3789,8 +3789,8 @@ let print_python_binding name { args; ret } =
>              pr "    for (size_t i = 0; i < %s; ++i)\n" len;
>              pr "      PyList_SET_ITEM (py_%s, i, PyLong_FromUnsignedLong (%s[i]));\n" n n
>           | BytesIn _
> -           | Int _
> -           | Int64 _ -> ()
> +         | Int _
> +         | Int64 _ -> ()

A bit of churn here that could have been squashed into patch 2.  But at
the end of the day, whether to spend more time polishing the patch when
the end result is fine is up to you.

ACK series. I'll rebase my auto-retire patches on top of this once
you've pushed.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20190724/4a281ea6/attachment.sig>


More information about the Libguestfs mailing list