fixed a bug in the replacement inet_ntoa
authorAndrew Tridgell <tridge@samba.org>
Wed, 29 Jul 1998 07:07:08 +0000 (07:07 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 29 Jul 1998 07:07:08 +0000 (07:07 +0000)
(This used to be commit 32bd7137122eedf44dbb092da5ae3106d8fe994e)

source3/lib/replace.c

index b4fea3dc313de84379e512ced4195b76cf01f3e0..1421233c1ef9cbc302661a378e1aeef4adb796db 100644 (file)
@@ -281,7 +281,7 @@ duplicate a string
 #ifdef REPLACE_INET_NTOA
 char *rep_inet_ntoa(struct in_addr ip)
 {
-       unsigned char *p = (unsigned char *)ip.s_addr;
+       unsigned char *p = (unsigned char *)&ip.s_addr;
        static char buf[18];
 #if WORDS_BIGENDIAN
        slprintf(buf, 17, "%d.%d.%d.%d",