mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
fixed warning and minor portability fix
svn path=/trunk/; revision=14655
This commit is contained in:
parent
3e18dad277
commit
c9a0b04418
1 changed files with 3 additions and 3 deletions
|
@ -56,14 +56,14 @@ netfinger(char *name)
|
||||||
struct hostent *hp, def;
|
struct hostent *hp, def;
|
||||||
struct servent *sp;
|
struct servent *sp;
|
||||||
struct sockaddr_in sin;
|
struct sockaddr_in sin;
|
||||||
int s;
|
SOCKET s;
|
||||||
char *alist[1], *host;
|
char *alist[1], *host;
|
||||||
|
|
||||||
/* If this is a local request */
|
/* If this is a local request */
|
||||||
if (!(host = rindex(name, '@')))
|
if (!(host = rindex(name, '@')))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
*host++ = NULL;
|
*host++ = '\0';
|
||||||
if (isdigit(*host) && (defaddr.s_addr = inet_addr(host)) != -1) {
|
if (isdigit(*host) && (defaddr.s_addr = inet_addr(host)) != -1) {
|
||||||
def.h_name = host;
|
def.h_name = host;
|
||||||
def.h_addr_list = alist;
|
def.h_addr_list = alist;
|
||||||
|
@ -84,7 +84,7 @@ netfinger(char *name)
|
||||||
sin.sin_family = hp->h_addrtype;
|
sin.sin_family = hp->h_addrtype;
|
||||||
bcopy(hp->h_addr, (char *)&sin.sin_addr, hp->h_length);
|
bcopy(hp->h_addr, (char *)&sin.sin_addr, hp->h_length);
|
||||||
sin.sin_port = sp->s_port;
|
sin.sin_port = sp->s_port;
|
||||||
if ((s = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0) {
|
if ((s = socket(hp->h_addrtype, SOCK_STREAM, 0)) == INVALID_SOCKET) {
|
||||||
perror("finger: socket");
|
perror("finger: socket");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue