qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3] error: passing a negative value to an os_err


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v3] error: passing a negative value to an os_errno is wrong
Date: Mon, 10 Nov 2014 09:14:25 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 11/09/2014 10:54 PM, SeokYeon Hwang wrote:
> Added 'assert(os_errno > 0)' in 'error_set_errno()'.

Commit message...

> Fixed errno since it passes wrong value to 'error_set_errno()'.
> 
> Signed-off-by: SeokYeon Hwang <address@hidden>
> ---
>  hw/pci/pcie.c | 2 +-

> +++ b/util/error.c
> @@ -62,6 +62,7 @@ void error_set_errno(Error **errp, int os_errno, ErrorClass 
> err_class,
>          return;
>      }
>      assert(*errp == NULL);
> +    assert(os_errno >= 0);

...does not match code. (Code is correct).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]