X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=lib%2Fofp-msgs.c;h=de20655b4ecdaa3794f46d64dca86bafe43593bd;hb=0a2869d524fc3612b4b77a9df4991bff2aa3b465;hp=bc38f401bb17777b3412d4cdab873d8de22a1f27;hpb=de658847fd5703ac7ac6413ec29ecf7f4db91421;p=cascardo%2Fovs.git diff --git a/lib/ofp-msgs.c b/lib/ofp-msgs.c index bc38f401b..de20655b4 100644 --- a/lib/ofp-msgs.c +++ b/lib/ofp-msgs.c @@ -407,9 +407,7 @@ ofphdrs_len(const struct ofphdrs *hdrs) enum ofperr ofpraw_decode(enum ofpraw *raw, const struct ofp_header *oh) { - struct ofpbuf msg; - - ofpbuf_use_const(&msg, oh, ntohs(oh->length)); + struct ofpbuf msg = ofpbuf_const_initializer(oh, ntohs(oh->length)); return ofpraw_pull(raw, &msg); }