From 1a62b0a598644b17d954bb630f998c038629c699 Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Mon, 16 Aug 2004 16:58:00 +0000 Subject: [PATCH] Added explicit type casting and replaced "-1" by INADDR_NONE. --- vfs/mcfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vfs/mcfs.c b/vfs/mcfs.c index e60eb0552..b27d0ad56 100644 --- a/vfs/mcfs.c +++ b/vfs/mcfs.c @@ -185,8 +185,8 @@ mcfs_get_remote_port (struct sockaddr_in *sin, int *version) for (pl = pmap_getmaps (sin); pl; pl = pl->pml_next) if (pl->pml_map.pm_prog == RPC_PROGNUM && pl->pml_map.pm_prot == IPPROTO_TCP - && pl->pml_map.pm_vers >= *version) { - *version = pl->pml_map.pm_vers; + && pl->pml_map.pm_vers >= (unsigned long) *version) { + *version = (int) pl->pml_map.pm_vers; port = pl->pml_map.pm_port; } return port; @@ -219,7 +219,7 @@ mcfs_create_tcp_link (char *host, int *port, int *version, char *caller) server_address.sin_family = AF_INET; /* Try to use the dotted decimal number */ - if ((inaddr = inet_addr (host)) != -1) + if ((inaddr = inet_addr (host)) != INADDR_NONE) memcpy ((char *) &server_address.sin_addr, (char *) &inaddr, sizeof (inaddr)); else {