Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24309 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-03-08 17:44:39 +00:00
parent 582b3d5a72
commit 5286000296

View File

@ -63,8 +63,8 @@ convert_from_r5_sockaddr(struct sockaddr *_to, const struct sockaddr *_from)
const r5_sockaddr_in *from = (r5_sockaddr_in *)_from;
sockaddr_in *to = (sockaddr_in *)_to;
memset(to, 0, sizeof(*to));
to->sin_len = sizeof(*to);
memset(to, 0, sizeof(sockaddr));
to->sin_len = sizeof(sockaddr);
if (from == NULL)
return;
@ -80,7 +80,8 @@ convert_from_r5_sockaddr(struct sockaddr *_to, const struct sockaddr *_from)
static void
convert_to_r5_sockaddr(struct sockaddr *_to, const struct sockaddr *_from)
convert_to_r5_sockaddr(struct sockaddr *_to,
const struct sockaddr *_from)
{
const sockaddr_in *from = (sockaddr_in *)_from;
r5_sockaddr_in *to = (r5_sockaddr_in *)_to;
@ -88,7 +89,8 @@ convert_to_r5_sockaddr(struct sockaddr *_to, const struct sockaddr *_from)
if (to == NULL)
return;
memset(to, 0, sizeof(*to));
memset(to, 0, sizeof(r5_sockaddr_in));
if (from->sin_family == AF_INET)
to->sin_family = R5_AF_INET;
else