don't let the compiler assume address of structure
authorJim Bloom <bloom@ucbvax.Berkeley.EDU>
Fri, 25 Oct 1985 06:50:01 +0000 (22:50 -0800)
committerJim Bloom <bloom@ucbvax.Berkeley.EDU>
Fri, 25 Oct 1985 06:50:01 +0000 (22:50 -0800)
SCCS-vsn: lib/libc/net/gethostnamadr.c 5.9

usr/src/lib/libc/net/gethostnamadr.c

index fae3b09..a0ef159 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)gethostnamadr.c    5.8 (Berkeley) %G%";
+static char sccsid[] = "@(#)gethostnamadr.c    5.9 (Berkeley) %G%";
 #endif not lint
 
 #include <sys/types.h>
 #endif not lint
 
 #include <sys/types.h>
@@ -211,7 +211,7 @@ gethostbyaddr(addr, len, type)
                return(NULL);
        hp->h_addrtype = type;
        hp->h_length = len;
                return(NULL);
        hp->h_addrtype = type;
        hp->h_length = len;
-       h_addr_ptrs[0] = (char *)host_addr;
+       h_addr_ptrs[0] = (char *)&host_addr;
        h_addr_ptrs[1] = (char *)0;
        host_addr = *(struct in_addr *)addr;
        return(hp);
        h_addr_ptrs[1] = (char *)0;
        host_addr = *(struct in_addr *)addr;
        return(hp);