flow: htons() zero initializers to make their size more clear.
authorJustin Pettit <jpettit@nicira.com>
Thu, 10 Nov 2011 07:54:33 +0000 (23:54 -0800)
committerJustin Pettit <jpettit@nicira.com>
Fri, 11 Nov 2011 02:03:05 +0000 (18:03 -0800)
lib/flow.c

index ec233bc94d5a1438336e00832ac06d010e0f2ea2..8b03e76e9d04b4ec62e4de6a0afa75952d17b607 100644 (file)
@@ -452,13 +452,13 @@ flow_zero_wildcards(struct flow *flow, const struct flow_wildcards *wildcards)
     }
     flow->vlan_tci &= wildcards->vlan_tci_mask;
     if (wc & FWW_DL_TYPE) {
-        flow->dl_type = 0;
+        flow->dl_type = htons(0);
     }
     if (wc & FWW_TP_SRC) {
-        flow->tp_src = 0;
+        flow->tp_src = htons(0);
     }
     if (wc & FWW_TP_DST) {
-        flow->tp_dst = 0;
+        flow->tp_dst = htons(0);
     }
     if (wc & FWW_DL_SRC) {
         memset(flow->dl_src, 0, sizeof flow->dl_src);