diff options
author | Ciprian Barbu <ciprian.barbu@linaro.org> | 2015-02-03 18:59:49 +0000 |
---|---|---|
committer | Zoltan Kiss <zoltan.kiss@linaro.org> | 2015-07-09 14:48:32 +0100 |
commit | 9a40e0c6384cac929b719c07f092ff0a2dfc4706 (patch) | |
tree | fc6aff2ce2ddac81290286f1ca008b8d36e1d792 | |
parent | dc021dfec135d90cefd36cf1599c83e1266bfc98 (diff) |
ofpbuf: init the buffer source before any other operations
The source was not initialized before calling ofpbuf_init__, which is needed by
the ODP netdev implementation.
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
-rw-r--r-- | lib/ofpbuf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ofpbuf.c b/lib/ofpbuf.c index 2d81761d6..06a8c1c0a 100644 --- a/lib/ofpbuf.c +++ b/lib/ofpbuf.c @@ -38,11 +38,11 @@ static void ofpbuf_use__(struct ofpbuf *b, void *base, size_t allocated, enum ofpbuf_source source) { + ofpbuf_init__(b, allocated, source); + ofpbuf_set_base(b, base); ofpbuf_set_data(b, base); ofpbuf_set_size(b, 0); - - ofpbuf_init__(b, allocated, source); } /* Initializes 'b' as an empty ofpbuf that contains the 'allocated' bytes of |