From d540d9cbb16ceb4ccc91bdcf983496f8a5a3399f Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Tue, 25 Aug 2009 16:34:45 -0700 Subject: [PATCH] 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. --- tests/test-vconn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.30.2