From: Eric Blake <eblake@redhat.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>, qemu-devel@nongnu.org
Cc: jan.kiszka@siemens.com, thuth@redhat.com, jasowang@redhat.com,
armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCHv4 2/2] slirp: Allow disabling IPv4 or IPv6
Date: Mon, 28 Mar 2016 09:12:04 -0600 [thread overview]
Message-ID: <56F949C4.3070302@redhat.com> (raw)
In-Reply-To: <1458862451-31703-3-git-send-email-samuel.thibault@ens-lyon.org>
[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]
On 03/24/2016 05:34 PM, Samuel Thibault wrote:
> Add ipv4 and ipv6 boolean options, so the user can setup IPv4-only and
> IPv6-only network environments.
>
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
>
> ---
>
> @@ -812,10 +822,18 @@ int net_init_slirp(const NetClientOptions *opts, const char *name,
> int ret;
> const NetdevUserOptions *user;
> const char **dnssearch;
> + int ipv4 = 1, ipv6 = 1;
These should be bool, and set to true.
>
> assert(opts->type == NET_CLIENT_OPTIONS_KIND_USER);
> user = opts->u.user.data;
>
> + if ((user->has_ipv6 && user->ipv6 && !user->has_ipv4)
> + || (user->has_ipv4 && !user->ipv4))
> + ipv4 = 0;
Inconsistent with current qemu style. Should be:
if ((user->has_ipv6 && user->ipv6 && !user->has_ipv4) ||
(user->has_ipv4 && !user->ipv4)) {
ipv4 = false;
}
In particular, the missing {} (should) fail ./scripts/checkpatch.pl.
> + if ((user->has_ipv4 && user->ipv4 && !user->has_ipv6)
> + || (user->has_ipv6 && !user->ipv6))
> + ipv6 = 0;
More missing {} and unusual indentation.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-03-28 15:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-24 23:34 [Qemu-devel] [PATCHv4 0/2] Rework ipv6 options, add ipv4/ipv6 enabling/disabling options Samuel Thibault
2016-03-24 23:34 ` [Qemu-devel] [PATCHv4 1/2] Rework ipv6 options Samuel Thibault
2016-03-28 15:00 ` Eric Blake
2016-03-24 23:34 ` [Qemu-devel] [PATCHv4 2/2] slirp: Allow disabling IPv4 or IPv6 Samuel Thibault
2016-03-28 15:12 ` Eric Blake [this message]
2016-03-28 23:46 ` Samuel Thibault
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=56F949C4.3070302@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=jasowang@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=samuel.thibault@ens-lyon.org \
--cc=thuth@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.