ofp-actions: Make ofpact_finish() harder to misuse.
authorBen Pfaff <blp@ovn.org>
Wed, 13 Apr 2016 05:00:25 +0000 (22:00 -0700)
committerBen Pfaff <blp@ovn.org>
Wed, 13 Apr 2016 19:37:15 +0000 (12:37 -0700)
commitce05810425872709ddda9d7755b3348f584849ff
tree573ffdcac73fa54e80af66264f8a7e331ca3bd7b
parent6e3a764c9e563fa35f750870070854a2d6b7f245
ofp-actions: Make ofpact_finish() harder to misuse.

It's pretty easy to forget to update the pointer to an ofpact when
finishing it.  This commit forces the caller to pass a pointer-to-pointer
instead, and uses that to automatically update the pointer.  There still
could be cases that retain other pointers into the ofpbuf, but I imagine
that this is harder to misuse.

Suggested-by: Joe Stringer <joe@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
lib/bundle.c
lib/learn.c
lib/ofp-actions.c
lib/ofp-actions.h
ofproto/ofproto-dpif.c
ovn/lib/actions.c