X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Ftest-vconn.c;h=34c2930a4944f53c28717e0ea29136f2e8fae48f;hb=cf3a5d915f8d4d0d1a7774430db4f11f161fea70;hp=7f85137af4c87af6e7442e2d39aaf8aac23d1691;hpb=e3fdfed11b8c56aa6a8deffe11a552fed7e7adbc;p=openvswitch diff --git a/tests/test-vconn.c b/tests/test-vconn.c index 7f85137a..34c2930a 100644 --- a/tests/test-vconn.c +++ b/tests/test-vconn.c @@ -78,7 +78,7 @@ fpv_create(const char *type, struct fake_pvconn *fpv) /* Retrieve socket's port number. */ sin_len = sizeof sin; - if (getsockname(fd, &sin, &sin_len) < 0) { + if (getsockname(fd, (struct sockaddr *)&sin, &sin_len) < 0) { ovs_fatal(errno, "failed to read TCP socket name"); } if (sin_len != sizeof sin || sin.sin_family != AF_INET) { @@ -224,7 +224,7 @@ test_send_hello(const char *type, const void *out, size_t out_size, fd = fpv_accept(&fpv); fpv_destroy(&fpv); - write(fd, out, out_size); + assert(write(fd, out, out_size) == out_size); assert(!set_nonblocking(fd));