ofpbuf: Simplify ofpbuf API.
[cascardo/ovs.git] / tests / test-netflow.c
index b918d15..d9f29d1 100644 (file)
@@ -161,8 +161,8 @@ print_netflow(struct ofpbuf *buf)
         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);
     }
 }
 
@@ -214,7 +214,7 @@ test_netflow_main(int argc, char *argv[])
 
         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);