tests: Cleanup getsockname argument warning
authorJustin Pettit <jpettit@nicira.com>
Tue, 25 Aug 2009 23:34:45 +0000 (16:34 -0700)
committerJustin Pettit <jpettit@nicira.com>
Tue, 25 Aug 2009 23:37:37 +0000 (16:37 -0700)
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

index 7f85137..1bcd8c6 100644 (file)
@@ -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) {