diff options
Diffstat (limited to 'networking')
-rw-r--r-- | networking/route.c | 12 | ||||
-rw-r--r-- | networking/wget.c | 14 |
2 files changed, 13 insertions, 13 deletions
diff --git a/networking/route.c b/networking/route.c index 337b35825..d571fc5a3 100644 --- a/networking/route.c +++ b/networking/route.c @@ -15,7 +15,7 @@ * Foundation; either version 2 of the License, or (at * your option) any later version. * - * $Id: route.c,v 1.9 2001/03/09 21:24:12 andersen Exp $ + * $Id: route.c,v 1.10 2001/03/21 07:34:26 andersen Exp $ * * displayroute() code added by Vladimir N. Oleynik <dzo@simtreas.ru> * adjustments by Larry Doolittle <LRDoolittle@lbl.gov> @@ -60,18 +60,18 @@ static int INET_resolve(char *name, struct sockaddr *sa) { - struct sockaddr_in *sin = (struct sockaddr_in *)sa; + struct sockaddr_in *s_in = (struct sockaddr_in *)sa; - sin->sin_family = AF_INET; - sin->sin_port = 0; + s_in->sin_family = AF_INET; + s_in->sin_port = 0; /* Default is special, meaning 0.0.0.0. */ if (strcmp(name, "default")==0) { - sin->sin_addr.s_addr = INADDR_ANY; + s_in->sin_addr.s_addr = INADDR_ANY; return 1; } /* Look to see if it's a dotted quad. */ - if (inet_aton(name, &sin->sin_addr)) { + if (inet_aton(name, &s_in->sin_addr)) { return 0; } /* guess not.. */ diff --git a/networking/wget.c b/networking/wget.c index 85023f977..f62d835e5 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -291,24 +291,24 @@ void parse_url(char *url, char **uri_host, int *uri_port, char **uri_path) FILE *open_socket(char *host, int port) { - struct sockaddr_in sin; + struct sockaddr_in s_in; struct hostent *hp; int fd; FILE *fp; - memset(&sin, 0, sizeof(sin)); - sin.sin_family = AF_INET; + memset(&s_in, 0, sizeof(s_in)); + s_in.sin_family = AF_INET; if ((hp = (struct hostent *) gethostbyname(host)) == NULL) error_msg_and_die("cannot resolve %s", host); - memcpy(&sin.sin_addr, hp->h_addr_list[0], hp->h_length); - sin.sin_port = htons(port); + memcpy(&s_in.sin_addr, hp->h_addr_list[0], hp->h_length); + s_in.sin_port = htons(port); /* * Get the server onto a stdio stream. */ if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) perror_msg_and_die("socket()"); - if (connect(fd, (struct sockaddr *) &sin, sizeof(sin)) < 0) + if (connect(fd, (struct sockaddr *) &s_in, sizeof(s_in)) < 0) perror_msg_and_die("connect(%s)", host); if ((fp = fdopen(fd, "r+")) == NULL) perror_msg_and_die("fdopen()"); @@ -534,7 +534,7 @@ progressmeter(int flag) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: wget.c,v 1.29 2001/03/09 21:24:12 andersen Exp $ + * $Id: wget.c,v 1.30 2001/03/21 07:34:26 andersen Exp $ */ |