* ftpfs.c (ftpfs_open_socket): Use INADDR_NONE, not -1.

This commit is contained in:
Pavel Roskin 2002-11-15 05:41:27 +00:00
parent f3afd054e9
commit 6b2d184d9e
2 changed files with 5 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2002-11-15 Pavel Roskin <proski@gnu.org>
* ftpfs.c (ftpfs_open_socket): Use INADDR_NONE, not -1.
2002-11-12 Pavel Roskin <proski@gnu.org>
* fish.c (fish_which): Remove.

View File

@ -654,9 +654,7 @@ ftpfs_open_socket (vfs *me, vfs_s_super *super)
memset ((char *) &server_address, 0, sizeof (server_address));
server_address.sin_family = AF_INET;
server_address.sin_addr.s_addr = inet_addr (host);
if (server_address.sin_addr.s_addr != -1)
server_address.sin_family = AF_INET;
else {
if (server_address.sin_addr.s_addr == INADDR_NONE) {
hp = gethostbyname (host);
if (hp == NULL){
print_vfs_message (_("ftpfs: Invalid host address."));