putchar('\n');
}
- if (ofpbuf_size(buf)) {
- printf("%"PRIu32" extra bytes after last record\n", ofpbuf_size(buf));
+ if (buf->size) {
+ printf("%"PRIu32" extra bytes after last record\n", buf->size);
}
}
ofpbuf_clear(&buf);
do {
- retval = recv(sock, ofpbuf_data(&buf), buf.allocated, 0);
+ retval = recv(sock, buf.data, buf.allocated, 0);
} while (retval < 0 && errno == EINTR);
if (retval > 0) {
ofpbuf_put_uninit(&buf, retval);