1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

Merge from HEAD, struct in_addr is always in network byte order, so we don't

need a little-endian case here.
(This used to be commit 24fb89da51)
This commit is contained in:
Andrew Bartlett 2002-12-01 03:07:42 +00:00
parent 6afdd64815
commit 755893ba3c

View File

@ -328,13 +328,8 @@ char *rep_inet_ntoa(struct in_addr ip)
{
unsigned char *p = (unsigned char *)&ip.s_addr;
static char buf[18];
#if WORDS_BIGENDIAN
slprintf(buf, 17, "%d.%d.%d.%d",
(int)p[0], (int)p[1], (int)p[2], (int)p[3]);
#else /* WORDS_BIGENDIAN */
slprintf(buf, 17, "%d.%d.%d.%d",
(int)p[3], (int)p[2], (int)p[1], (int)p[0]);
#endif /* WORDS_BIGENDIAN */
return buf;
}
#endif /* REPLACE_INET_NTOA */