headers, and use INADDR_NONE appropriately.
This commit is contained in:
parent
f752024932
commit
dbacaea969
@ -33,7 +33,7 @@
|
||||
|
||||
#ifndef lint
|
||||
/* from: static char sccsid[] = "@(#)commands.c 8.1 (Berkeley) 6/6/93"; */
|
||||
static char *rcsid = "$Id: commands.c,v 1.6 1994/05/08 20:42:26 mycroft Exp $";
|
||||
static char *rcsid = "$Id: commands.c,v 1.7 1994/12/24 17:50:00 cgd Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#if defined(unix)
|
||||
@ -2154,7 +2154,7 @@ tn(argc, argv)
|
||||
} else {
|
||||
#endif
|
||||
temp = inet_addr(hostp);
|
||||
if (temp != (unsigned long) -1) {
|
||||
if (temp != INADDR_NONE) {
|
||||
sin.sin_addr.s_addr = temp;
|
||||
sin.sin_family = AF_INET;
|
||||
(void) strcpy(_hostname, hostp);
|
||||
@ -2732,7 +2732,7 @@ sourceroute(arg, cpp, lenp)
|
||||
if (!c)
|
||||
cp2 = 0;
|
||||
|
||||
if ((tmp = inet_addr(cp)) != -1) {
|
||||
if ((tmp = inet_addr(cp)) != INADDR_NONE) {
|
||||
sin_addr.s_addr = tmp;
|
||||
} else if (host = gethostbyname(cp)) {
|
||||
#if defined(h_addr)
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)externs.h 8.1 (Berkeley) 6/6/93
|
||||
* $Id: externs.h,v 1.3 1994/02/25 03:00:25 cgd Exp $
|
||||
* $Id: externs.h,v 1.4 1994/12/24 17:50:05 cgd Exp $
|
||||
*/
|
||||
|
||||
#ifndef BSD
|
||||
@ -52,6 +52,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
#if defined(CRAY) && !defined(NO_BSD_SETJMP)
|
||||
#include <bsdsetjmp.h>
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#ifndef lint
|
||||
/* from: static char sccsid[] = "@(#)ring.c 8.1 (Berkeley) 6/6/93"; */
|
||||
static char *rcsid = "$Id: ring.c,v 1.3 1994/02/25 03:00:34 cgd Exp $";
|
||||
static char *rcsid = "$Id: ring.c,v 1.4 1994/12/24 17:50:06 cgd Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -48,6 +48,10 @@ static char *rcsid = "$Id: ring.c,v 1.3 1994/02/25 03:00:34 cgd Exp $";
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifndef NO_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#include <strings.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef size_t
|
||||
|
Loading…
Reference in New Issue
Block a user