qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: SeokYeon Hwang <syeon.hwang@samsung.com>, qemu-devel@nongnu.org
Cc: kongjianjun@gmail.com, paolo.bonzini@gmail.com, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4] error: passing a negative value to an os_errno is wrong
Date: Wed, 12 Nov 2014 09:30:12 +0100	[thread overview]
Message-ID: <54631A94.4060906@redhat.com> (raw)
In-Reply-To: <1415776088-4708-1-git-send-email-syeon.hwang@samsung.com>

On 2014-11-12 at 08:08, SeokYeon Hwang wrote:
> Added 'assert(os_errno >= 0)' in 'error_set_errno()'.
>
> Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
> ---
>   util/error.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/util/error.c b/util/error.c
> index 2ace0d8..6c9d995 100644
> --- a/util/error.c
> +++ 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);
>   
>       err = g_malloc0(sizeof(*err));
>   

Reviewed-by: Max Reitz <mreitz@redhat.com>

      parent reply	other threads:[~2014-11-12  8:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12  7:08 [Qemu-devel] [PATCH v4] error: passing a negative value to an os_errno is wrong SeokYeon Hwang
2014-11-12  7:35 ` Markus Armbruster
2014-11-12  8:30 ` Max Reitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54631A94.4060906@redhat.com \
    --to=mreitz@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kongjianjun@gmail.com \
    --cc=paolo.bonzini@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=syeon.hwang@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).