[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]