From: Richard Henderson <richard.henderson@linaro.org>
To: Julio Faracco <jcfaracco@gmail.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH v2] i386: Fix GCC warning with snprintf when HAX is enabled
Date: Sun, 1 Mar 2020 20:15:48 -0800 [thread overview]
Message-ID: <6807c84f-8f17-6f02-ac79-4da42d8bcba0@linaro.org> (raw)
In-Reply-To: <20200301191708.18035-1-jcfaracco@gmail.com>
On 3/1/20 11:17 AM, Julio Faracco wrote:
> - snprintf(name, sizeof HAX_VM_DEVFS, "/dev/hax_vm/vm%02d", vm_id);
> + assert(vm_id < 0);
> +
> + if (snprintf(name, sizeof HAX_VM_DEVFS, "/dev/hax_vm/vm%02d",
> + vm_id) < 0)
> + return NULL;
> +
No, you don't need the IF around the snprinf.
r~
next prev parent reply other threads:[~2020-03-02 4:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-01 19:17 [PATCH v2] i386: Fix GCC warning with snprintf when HAX is enabled Julio Faracco
2020-03-02 4:15 ` Richard Henderson [this message]
2020-03-02 4:16 ` Richard Henderson
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=6807c84f-8f17-6f02-ac79-4da42d8bcba0@linaro.org \
--to=richard.henderson@linaro.org \
--cc=ehabkost@redhat.com \
--cc=jcfaracco@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).