aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-27 15:00:11 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-27 15:28:44 -0400
commit4d81f5211b3c714edae6370bccc6873033c0092d (patch)
tree351446df167a5e80530a66dcb7b13c697fa19180 /src/common/util.c
parent000de2f2ac4f740be8351673691371d78a5da7e9 (diff)
downloadtor-4d81f5211b3c714edae6370bccc6873033c0092d.tar.gz
tor-4d81f5211b3c714edae6370bccc6873033c0092d.zip
Move set/get_uint*() to inline functions in arch/bytes.h
Also move our ntohll/htonll functions.
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 6233b8e4f1..09d3b2679c 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -2848,24 +2848,3 @@ ENABLE_GCC_WARNING(double-promotion)
ENABLE_GCC_WARNING(float-conversion)
#endif
}
-
-/** Return a uint64_t value from <b>a</b> in network byte order. */
-uint64_t
-tor_htonll(uint64_t a)
-{
-#ifdef WORDS_BIGENDIAN
- /* Big endian. */
- return a;
-#else /* WORDS_BIGENDIAN */
- /* Little endian. The worst... */
- return htonl((uint32_t)(a>>32)) |
- (((uint64_t)htonl((uint32_t)a))<<32);
-#endif /* defined(WORDS_BIGENDIAN) */
-}
-
-/** Return a uint64_t value from <b>a</b> in host byte order. */
-uint64_t
-tor_ntohll(uint64_t a)
-{
- return tor_htonll(a);
-}