flow: Rename flow_compare() to flow_compare_3way().
authorBen Pfaff <blp@nicira.com>
Tue, 25 Oct 2011 23:33:38 +0000 (16:33 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 17 Nov 2011 18:11:53 +0000 (10:11 -0800)
I like the _3way suffix convention.  It makes the interpretation of the
return value clear.  We use it elsewhere in the tree, so use it here too.

There weren't any users of flow_compare() outside of flow.h, but there soon
will be.

lib/flow.h

index 3421d4f..78f0b27 100644 (file)
@@ -96,14 +96,14 @@ void flow_zero_wildcards(struct flow *, const struct flow_wildcards *);
 char *flow_to_string(const struct flow *);
 void flow_format(struct ds *, const struct flow *);
 void flow_print(FILE *, const struct flow *);
-static inline int flow_compare(const struct flow *, const struct flow *);
+static inline int flow_compare_3way(const struct flow *, const struct flow *);
 static inline bool flow_equal(const struct flow *, const struct flow *);
 static inline size_t flow_hash(const struct flow *, uint32_t basis);
 
 void flow_compose(struct ofpbuf *, const struct flow *);
 
 static inline int
-flow_compare(const struct flow *a, const struct flow *b)
+flow_compare_3way(const struct flow *a, const struct flow *b)
 {
     return memcmp(a, b, FLOW_SIG_SIZE);
 }
@@ -111,7 +111,7 @@ flow_compare(const struct flow *a, const struct flow *b)
 static inline bool
 flow_equal(const struct flow *a, const struct flow *b)
 {
-    return !flow_compare(a, b);
+    return !flow_compare_3way(a, b);
 }
 
 static inline size_t