git://git.onelab.eu
/
sliver-openvswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5bf64ad
)
ofpbuf: New helper ofpbuf_equal().
author
Ethan Jackson
<ethan@nicira.com>
Tue, 19 Mar 2013 21:46:12 +0000
(14:46 -0700)
committer
Ethan Jackson
<ethan@nicira.com>
Wed, 29 May 2013 20:15:15 +0000
(13:15 -0700)
Used in future commits.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
lib/ofpbuf.h
patch
|
blob
|
history
diff --git
a/lib/ofpbuf.h
b/lib/ofpbuf.h
index
8b03c7e
..
0c12162
100644
(file)
--- a/
lib/ofpbuf.h
+++ b/
lib/ofpbuf.h
@@
-107,6
+107,12
@@
static inline struct ofpbuf *ofpbuf_from_list(const struct list *list)
}
void ofpbuf_list_delete(struct list *);
}
void ofpbuf_list_delete(struct list *);
+static inline bool
+ofpbuf_equal(const struct ofpbuf *a, const struct ofpbuf *b)
+{
+ return a->size == b->size && memcmp(a->data, b->data, a->size) == 0;
+}
+
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
}
#endif