ossp-pkg/l2/l2_ut_sa.c 1.6 -> 1.7
--- l2_ut_sa.c 2001/09/11 10:37:04 1.6
+++ l2_ut_sa.c 2001/09/13 12:19:45 1.7
@@ -295,13 +295,13 @@
/* fill in family */
sf = 0;
if (sizeof(struct sockaddr_in) == salen) {
- sa4 = (struct sockaddr_in *)sabuf;
+ sa4 = (struct sockaddr_in *)((void *)sabuf);
if (sa4->sin_family == AF_INET)
sf = AF_INET;
}
#ifdef AF_INET6
else if (sizeof(struct sockaddr_in6) == salen) {
- sa6 = (struct sockaddr_in6 *)sabuf;
+ sa6 = (struct sockaddr_in6 *)((void *)sabuf);
if (sa6->sin6_family == AF_INET6)
sf = AF_INET6;
}
@@ -332,13 +332,13 @@
if ((pe = getprotobynumber(saa->saa_proto)) == NULL)
return SA_ERR_SYS;
if (saa->saa_family == AF_INET) {
- sa4 = (struct sockaddr_in *)saa->saa_buf;
+ sa4 = (struct sockaddr_in *)((void *)saa->saa_buf);
inet_ntop(AF_INET, &sa4->sin_addr.s_addr, caHost, sizeof(caHost));
nPort = ntohs(sa4->sin_port);
}
#ifdef AF_INET6
else if (saa->saa_family == AF_INET6) {
- sa6 = (struct sockaddr_in6 *)saa->saa_buf;
+ sa6 = (struct sockaddr_in6 *)((void *)saa->saa_buf);
inet_ntop(AF_INET6, &sa6->sin6_addr.s6_addr, caHost, sizeof(caHost));
nPort = ntohs(sa6->sin6_port);
}
|
|