1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-28 17:10:59 +01:00

17162: Src/Modules/tcp.c: prevent warning on

gethostbyaddr() arguments.
This commit is contained in:
Peter Stephenson 2002-05-14 17:52:50 +00:00
parent 568d2e0aba
commit 92e651c940
2 changed files with 5 additions and 2 deletions

View file

@ -565,12 +565,12 @@ bin_ztcp(char *nam, char **args, char *ops, int func)
if (sess->fd != -1)
{
zthost = gethostbyaddr(&(sess->sock.in.sin_addr), sizeof(struct sockaddr_in), AF_INET);
zthost = gethostbyaddr((const void *)&(sess->sock.in.sin_addr), sizeof(struct sockaddr_in), AF_INET);
if (zthost)
localname = zthost->h_name;
else
localname = ztrdup(inet_ntoa(sess->sock.in.sin_addr));
ztpeer = gethostbyaddr(&(sess->peer.in.sin_addr), sizeof(struct sockaddr_in), AF_INET);
ztpeer = gethostbyaddr((const void *)&(sess->peer.in.sin_addr), sizeof(struct sockaddr_in), AF_INET);
if (ztpeer)
remotename = ztpeer->h_name;
else