From: John Hay Date: Sat, 7 Sep 2002 13:24:13 +0000 (+0200) Subject: Do this in a more obvious way. The result is that the bytes are now swapped X-Git-Tag: NTP_4_1_73~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=804e38dfe41f9641f5504bd4134a85fa3d948335;p=thirdparty%2Fntp.git Do this in a more obvious way. The result is that the bytes are now swapped compared to the previous way. bk: 3d79fdfdmhkiYHtrxbq4qpB21FyXZA --- diff --git a/libntp/a_md5encrypt.c b/libntp/a_md5encrypt.c index a65b02ba48..51a7d5f971 100644 --- a/libntp/a_md5encrypt.c +++ b/libntp/a_md5encrypt.c @@ -99,12 +99,6 @@ addr2refid(struct sockaddr_storage *addr) MD5Update(&md5, (u_char *)&GET_INADDR6(*addr), sizeof(struct in6_addr)); MD5Final(digest, &md5); - addr_refid = digest[0]; - addr_refid <<= 8; - addr_refid |= digest[1]; - addr_refid <<= 8; - addr_refid |= digest[2]; - addr_refid <<= 8; - addr_refid |= digest[3]; + memcpy(&addr_refid, digest, 4); return (htonl(addr_refid)); }