diff options
Diffstat (limited to 'lib/ofp-errors.c')
-rw-r--r-- | lib/ofp-errors.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ofp-errors.c b/lib/ofp-errors.c index ce85f6758..615910520 100644 --- a/lib/ofp-errors.c +++ b/lib/ofp-errors.c @@ -327,8 +327,8 @@ ofperr_decode_msg(const struct ofp_header *oh, struct ofpbuf *payload) /* Translate the error type and code into an ofperr. */ error = ofperr_decode(oh->version, vendor, type, code); if (error && payload) { - ofpbuf_init(payload, ofpbuf_size(&b)); - ofpbuf_push(payload, ofpbuf_data(&b), ofpbuf_size(&b)); + ofpbuf_init(payload, b.size); + ofpbuf_push(payload, b.data, b.size); } return error; } |