This assertion was removed as part of a commit that was intended to
just be a cleanup.
Fixes: 6fd6ed71cb9f ("ofpbuf: Simplify ofpbuf API.")
Signed-off-by: Ben Pfaff <[email protected]>
---
include/openvswitch/ofpbuf.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/openvswitch/ofpbuf.h b/include/openvswitch/ofpbuf.h
index dffd78414ced..71ee0c9534a3 100644
--- a/include/openvswitch/ofpbuf.h
+++ b/include/openvswitch/ofpbuf.h
@@ -246,6 +246,7 @@ static inline void ofpbuf_clear(struct ofpbuf *b)
* 'size' bytes of data. Returns the first byte of data removed. */
static inline void *ofpbuf_pull(struct ofpbuf *b, size_t size)
{
+ ovs_assert(b->size >= size);
void *data = b->data;
b->data = (char*)b->data + size;
b->size = b->size - size;
--
2.20.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev