X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=lib%2Fofpbuf.c;h=a7d4c734181763e5134175d59defb8c69d658989;hb=038341d1c1c33107a7f2ad06a5acb47c5fff7967;hp=02e5aa870ed7669ae4c0fd31ba02b7e4838efc04;hpb=e0edde6fee279cdbbf3c179f5f50adaf0c7c7f1e;p=openvswitch diff --git a/lib/ofpbuf.c b/lib/ofpbuf.c index 02e5aa87..a7d4c734 100644 --- a/lib/ofpbuf.c +++ b/lib/ofpbuf.c @@ -95,7 +95,7 @@ ofpbuf_use_stub(struct ofpbuf *b, void *base, size_t allocated) void ofpbuf_use_const(struct ofpbuf *b, const void *data, size_t size) { - ofpbuf_use__(b, (void *) data, size, OFPBUF_STACK); + ofpbuf_use__(b, CONST_CAST(void *, data), size, OFPBUF_STACK); b->size = size; } @@ -408,7 +408,7 @@ ofpbuf_put_hex(struct ofpbuf *b, const char *s, size_t *n) if (n) { *n = b->size - initial_size; } - return (char *) s; + return CONST_CAST(char *, s); } ofpbuf_put(b, &byte, 1);