diff options
author | Shi Lei <shi_lei@massclouds.com> | 2018-09-19 16:38:14 +0800 |
---|---|---|
committer | Michal Privoznik <mprivozn@redhat.com> | 2018-09-24 10:02:40 +0200 |
commit | 34e9c29357ef5c293c8f998ef6911756cbb8b405 (patch) | |
tree | 6cb3e404e25ef9403bbd9a0fb1498c42462ded03 /src/util/virnetdevip.c | |
parent | bfdd20c5a9747528dfd2da0352c18069787887c8 (diff) | |
download | libvirt-34e9c29357ef5c293c8f998ef6911756cbb8b405.tar.gz |
util: Fix misaligned arguments and misaligned conditions for [if|while|...]
This patch just fixes misaligned arguments and misaligned conditions
of src/util/*.c.
Signed-off-by: Shi Lei <shi_lei@massclouds.com>
Diffstat (limited to 'src/util/virnetdevip.c')
-rw-r--r-- | src/util/virnetdevip.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index 103ff9edcb..9f940e1029 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -404,7 +404,7 @@ virNetDevIPParseDadStatus(struct nlmsghdr *nlh, int len, VIR_WARNINGS_NO_CAST_ALIGN rtattr_ptr = (struct rtattr *) IFA_RTA(ifaddrmsg_ptr); for (; RTA_OK(rtattr_ptr, ifaddrmsg_len); - rtattr_ptr = RTA_NEXT(rtattr_ptr, ifaddrmsg_len)) { + rtattr_ptr = RTA_NEXT(rtattr_ptr, ifaddrmsg_len)) { VIR_WARNINGS_RESET if (RTA_PAYLOAD(rtattr_ptr) != sizeof(struct in6_addr)) { /* No address: ignore. */ @@ -660,9 +660,10 @@ virNetDevIPAddrAdd(const char *ifname, return -1; /* format up a broadcast address if this is IPv4 */ - if (!peerstr && ((VIR_SOCKET_ADDR_IS_FAMILY(addr, AF_INET)) && - ((virSocketAddrBroadcastByPrefix(addr, prefix, &broadcast) < 0) || - !(bcaststr = virSocketAddrFormat(&broadcast))))) { + if (!peerstr && + ((VIR_SOCKET_ADDR_IS_FAMILY(addr, AF_INET)) && + ((virSocketAddrBroadcastByPrefix(addr, prefix, &broadcast) < 0) || + !(bcaststr = virSocketAddrFormat(&broadcast))))) { return -1; } @@ -749,7 +750,7 @@ virNetDevIPRouteAdd(const char *ifname, virCommandAddArgList(cmd, "route", "add", NULL); virCommandAddArgFormat(cmd, "%s/%u", addrstr, prefix); virCommandAddArgList(cmd, "via", gatewaystr, "dev", ifname, - "proto", "static", "metric", NULL); + "proto", "static", "metric", NULL); virCommandAddArgFormat(cmd, "%u", metric); if (virCommandRun(cmd, NULL) < 0) |