From: Ethan Jackson Date: Thu, 4 Aug 2011 23:50:25 +0000 (-0700) Subject: lib: Whitespace cleanup. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b53055f4da4f8de17c591ae07ddd782829d21cd8;p=openvswitch lib: Whitespace cleanup. --- diff --git a/lib/classifier.c b/lib/classifier.c index faaeaf5b..730cae84 100644 --- a/lib/classifier.c +++ b/lib/classifier.c @@ -630,11 +630,11 @@ cls_rule_format(const struct cls_rule *rule, struct ds *s) ds_put_char(s, ','); } if (!(w & FWW_ARP_SHA)) { - ds_put_format(s, "nd_sll="ETH_ADDR_FMT",", + ds_put_format(s, "nd_sll="ETH_ADDR_FMT",", ETH_ADDR_ARGS(f->arp_sha)); } if (!(w & FWW_ARP_THA)) { - ds_put_format(s, "nd_tll="ETH_ADDR_FMT",", + ds_put_format(s, "nd_tll="ETH_ADDR_FMT",", ETH_ADDR_ARGS(f->arp_tha)); } } else { @@ -1172,7 +1172,7 @@ flow_equal_except(const struct flow *a, const struct flow *b, &wildcards->ipv6_src_mask) && ipv6_equal_except(&a->ipv6_dst, &b->ipv6_dst, &wildcards->ipv6_dst_mask) - && (wc & FWW_ND_TARGET + && (wc & FWW_ND_TARGET || ipv6_addr_equals(&a->nd_target, &b->nd_target))); } diff --git a/lib/flow.c b/lib/flow.c index fc09a77a..460771cc 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -477,7 +477,7 @@ flow_format(struct ds *ds, const struct flow *flow) print_ipv6_addr(ds, &flow->ipv6_src); ds_put_cstr(ds, "->"); print_ipv6_addr(ds, &flow->ipv6_dst); - + } else { ds_put_format(ds, " proto%"PRIu8 " tos%"PRIu8 @@ -612,7 +612,7 @@ flow_wildcards_equal(const struct flow_wildcards *a, || a->tun_id_mask != b->tun_id_mask || a->nw_src_mask != b->nw_src_mask || a->nw_dst_mask != b->nw_dst_mask - || a->vlan_tci_mask != b->vlan_tci_mask + || a->vlan_tci_mask != b->vlan_tci_mask || !ipv6_addr_equals(&a->ipv6_src_mask, &b->ipv6_src_mask) || !ipv6_addr_equals(&a->ipv6_dst_mask, &b->ipv6_dst_mask)) { return false; diff --git a/lib/learning-switch.c b/lib/learning-switch.c index 4a5d8891..b2608629 100644 --- a/lib/learning-switch.c +++ b/lib/learning-switch.c @@ -149,7 +149,7 @@ lswitch_create(struct rconn *rconn, const struct lswitch_config *cfg) } } } - + return sw; } diff --git a/lib/netdev.c b/lib/netdev.c index cd824f84..12ac81d6 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -640,7 +640,7 @@ netdev_set_advertisements(struct netdev *netdev, uint32_t advertise) * * - EOPNOTSUPP: No IPv4 network stack attached to 'netdev'. * - * 'address' or 'netmask' or both may be null, in which case the address or + * 'address' or 'netmask' or both may be null, in which case the address or * netmask is not reported. */ int netdev_get_in4(const struct netdev *netdev, diff --git a/lib/odp-util.c b/lib/odp-util.c index d5523163..b4163805 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -761,7 +761,7 @@ odp_flow_key_from_flow(struct ofpbuf *buf, const struct flow *flow) memcpy(arp_key->arp_sha, flow->arp_sha, ETH_ADDR_LEN); memcpy(arp_key->arp_tha, flow->arp_tha, ETH_ADDR_LEN); } - + if (flow->dl_type == htons(ETH_TYPE_IP) || flow->dl_type == htons(ETH_TYPE_IPV6)) { diff --git a/lib/util.c b/lib/util.c index d430a500..e6d57dad 100644 --- a/lib/util.c +++ b/lib/util.c @@ -301,7 +301,7 @@ set_program_name__(const char *argv0, const char *date, const char *time) /* Returns a pointer to a string describing the program version. The * caller must not modify or free the returned string. - */ + */ const char * get_program_version(void) { diff --git a/ofproto/netflow.c b/ofproto/netflow.c index 381ff8ef..f0af436d 100644 --- a/ofproto/netflow.c +++ b/ofproto/netflow.c @@ -104,7 +104,7 @@ struct netflow { static void gen_netflow_rec(struct netflow *nf, struct netflow_flow *nf_flow, - struct ofexpired *expired, + struct ofexpired *expired, uint32_t packet_count, uint32_t byte_count) { struct netflow_v5_header *nf_hdr; diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index f53cc430..010d98b4 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -1397,7 +1397,7 @@ is_mirror_output_bundle(struct ofproto *ofproto_, void *aux) } static void -forward_bpdu_changed(struct ofproto *ofproto_) +forward_bpdu_changed(struct ofproto *ofproto_) { struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofproto_); /* Revalidate cached flows whenever forward_bpdu option changes. */ @@ -3777,9 +3777,9 @@ is_admissible(struct ofproto_dpif *ofproto, const struct flow *flow, return false; } - /* Drop frames for reserved multicast addresses + /* Drop frames for reserved multicast addresses * only if forward_bpdu option is absent. */ - if (eth_addr_is_reserved(flow->dl_dst) && + if (eth_addr_is_reserved(flow->dl_dst) && !ofproto->up.forward_bpdu) { return false; } diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 6fd2369d..849a376a 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -430,7 +430,7 @@ ofproto_set_flow_eviction_threshold(struct ofproto *ofproto, unsigned threshold) } } -/* If forward_bpdu is true, the NORMAL action will forward frames with +/* If forward_bpdu is true, the NORMAL action will forward frames with * reserved (e.g. STP) destination Ethernet addresses. if forward_bpdu is false, * the NORMAL action will drop these frames. */ void @@ -442,7 +442,7 @@ ofproto_set_forward_bpdu(struct ofproto *ofproto, bool forward_bpdu) if (ofproto->ofproto_class->forward_bpdu_changed) { ofproto->ofproto_class->forward_bpdu_changed(ofproto); } - } + } } void