diff options
author | Roger Dingledine <arma@torproject.org> | 2010-12-19 22:08:42 -0500 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2010-12-19 22:08:42 -0500 |
commit | c79427a9921787abab8f0d6e0c621dc974d98453 (patch) | |
tree | 1c7c6a8e83c33c3206e675f9d161f1c1afc9ef17 /src/common/compat.h | |
parent | dd2ae32bc181efdc134c25359bc67d073c48a1d0 (diff) | |
parent | a62038f01db0df22f864623e6d82d69b447c1414 (diff) | |
download | tor-c79427a9921787abab8f0d6e0c621dc974d98453.tar.gz tor-c79427a9921787abab8f0d6e0c621dc974d98453.zip |
Merge branch 'maint-0.2.2'
Diffstat (limited to 'src/common/compat.h')
-rw-r--r-- | src/common/compat.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index 590da949c0..334fef05b8 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -500,18 +500,18 @@ long tor_weak_random(void); /* ===== OS compatibility */ const char *get_uname(void); -uint16_t get_uint16(const char *cp) ATTR_PURE ATTR_NONNULL((1)); -uint32_t get_uint32(const char *cp) ATTR_PURE ATTR_NONNULL((1)); -uint64_t get_uint64(const char *cp) ATTR_PURE ATTR_NONNULL((1)); -void set_uint16(char *cp, uint16_t v) ATTR_NONNULL((1)); -void set_uint32(char *cp, uint32_t v) ATTR_NONNULL((1)); -void set_uint64(char *cp, uint64_t v) ATTR_NONNULL((1)); +uint16_t get_uint16(const void *cp) ATTR_PURE ATTR_NONNULL((1)); +uint32_t get_uint32(const void *cp) ATTR_PURE ATTR_NONNULL((1)); +uint64_t get_uint64(const void *cp) ATTR_PURE ATTR_NONNULL((1)); +void set_uint16(void *cp, uint16_t v) ATTR_NONNULL((1)); +void set_uint32(void *cp, uint32_t v) ATTR_NONNULL((1)); +void set_uint64(void *cp, uint64_t v) ATTR_NONNULL((1)); /* These uint8 variants are defined to make the code more uniform. */ #define get_uint8(cp) (*(const uint8_t*)(cp)) -static void set_uint8(char *cp, uint8_t v); +static void set_uint8(void *cp, uint8_t v); static INLINE void -set_uint8(char *cp, uint8_t v) +set_uint8(void *cp, uint8_t v) { *(uint8_t*)cp = v; } |