X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fofpbuf.c;h=30ae12e6d1118408c83931399c1fd030a17ce2e4;hb=6164839f3ee00436b32af3100c903ee152803117;hp=f7145dbfe90607080c3243ea6498f940bf5fb5d1;hpb=be9fa766bc98b5d245d6ace51a2baba1e78ce1c3;p=sliver-openvswitch.git diff --git a/lib/ofpbuf.c b/lib/ofpbuf.c index f7145dbfe..30ae12e6d 100644 --- a/lib/ofpbuf.c +++ b/lib/ofpbuf.c @@ -407,7 +407,7 @@ ofpbuf_put_hex(struct ofpbuf *b, const char *s, size_t *n) uint8_t byte; bool ok; - s += strspn(s, " "); + s += strspn(s, " \t\r\n"); byte = hexits_value(s, 2, &ok); if (!ok) { if (n) { @@ -553,7 +553,7 @@ ofpbuf_to_string(const struct ofpbuf *b, size_t maxbytes) struct ds s; ds_init(&s); - ds_put_format(&s, "size=%zu, allocated=%zu, head=%zu, tail=%zu\n", + ds_put_format(&s, "size=%"PRIuSIZE", allocated=%"PRIuSIZE", head=%"PRIuSIZE", tail=%"PRIuSIZE"\n", b->size, b->allocated, ofpbuf_headroom(b), ofpbuf_tailroom(b)); ds_put_hex_dump(&s, b->data, MIN(b->size, maxbytes), 0, false);