From: Justin Pettit Date: Tue, 25 Aug 2009 23:34:45 +0000 (-0700) Subject: tests: Cleanup getsockname argument warning X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d540d9cbb16ceb4ccc91bdcf983496f8a5a3399f;p=openvswitch tests: Cleanup getsockname argument warning The second argument was being passed in as a sockaddr_in, when it should be a sockaddr. This commit cleans up the warning by casting it. --- diff --git a/tests/test-vconn.c b/tests/test-vconn.c index 7f85137a..1bcd8c62 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) {