Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/tcpdchk Fix one that Christos missed.



details:   https://anonhg.NetBSD.org/src/rev/a23b81277d31
branches:  trunk
changeset: 472847:a23b81277d31
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun May 09 21:22:53 1999 +0000

description:
Fix one that Christos missed.

diffstat:

 usr.sbin/tcpdchk/scaffold.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 95de2d3b938c -r a23b81277d31 usr.sbin/tcpdchk/scaffold.c
--- a/usr.sbin/tcpdchk/scaffold.c       Sun May 09 20:11:23 1999 +0000
+++ b/usr.sbin/tcpdchk/scaffold.c       Sun May 09 21:22:53 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scaffold.c,v 1.4 1999/05/09 16:05:35 christos Exp $    */
+/*     $NetBSD: scaffold.c,v 1.5 1999/05/09 21:22:53 thorpej Exp $     */
 
  /*
   * Routines for testing only. Not really industrial strength.
@@ -11,7 +11,7 @@
 #if 0
 static char sccs_id[] = "@(#) scaffold.c 1.5 95/01/03 09:13:48";
 #else
-__RCSID("$NetBSD: scaffold.c,v 1.4 1999/05/09 16:05:35 christos Exp $");
+__RCSID("$NetBSD: scaffold.c,v 1.5 1999/05/09 21:22:53 thorpej Exp $");
 #endif
 #endif
 
@@ -88,6 +88,7 @@
 char   *host;
 {
     struct in_addr addr;
+    unsigned long addr_num;
     struct hostent *hp;
     static struct hostent h;
     static char *addr_list[2];
@@ -95,7 +96,8 @@
     /*
      * Host address: translate it to internal form.
      */
-    if (dot_quad_addr(host, &addr) == 0) {
+    if (dot_quad_addr(host, &addr_num) == 0) {
+       addr.s_addr = (addr_num & 0xffffffff);
        h.h_addr_list = addr_list;
        h.h_addr_list[0] = (char *) &addr;
        h.h_length = sizeof(addr);



Home | Main Index | Thread Index | Old Index