summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toxcore/util.c4
-rw-r--r--toxcore/util.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/toxcore/util.c b/toxcore/util.c
index 46b33400..e3bfac4c 100644
--- a/toxcore/util.c
+++ b/toxcore/util.c
@@ -58,12 +58,12 @@ int is_timeout(uint64_t timestamp, uint64_t timeout)
58 58
59 59
60/* id functions */ 60/* id functions */
61bool id_equal(uint8_t *dest, uint8_t *src) 61bool id_equal(const uint8_t *dest, const uint8_t *src)
62{ 62{
63 return memcmp(dest, src, CLIENT_ID_SIZE) == 0; 63 return memcmp(dest, src, CLIENT_ID_SIZE) == 0;
64} 64}
65 65
66uint32_t id_copy(uint8_t *dest, uint8_t *src) 66uint32_t id_copy(uint8_t *dest, const uint8_t *src)
67{ 67{
68 memcpy(dest, src, CLIENT_ID_SIZE); 68 memcpy(dest, src, CLIENT_ID_SIZE);
69 return CLIENT_ID_SIZE; 69 return CLIENT_ID_SIZE;
diff --git a/toxcore/util.h b/toxcore/util.h
index 71c2f5c7..74348c11 100644
--- a/toxcore/util.h
+++ b/toxcore/util.h
@@ -36,8 +36,8 @@ int is_timeout(uint64_t timestamp, uint64_t timeout);
36 36
37 37
38/* id functions */ 38/* id functions */
39bool id_equal(uint8_t *dest, uint8_t *src); 39bool id_equal(const uint8_t *dest, const uint8_t *src);
40uint32_t id_copy(uint8_t *dest, uint8_t *src); /* return value is CLIENT_ID_SIZE */ 40uint32_t id_copy(uint8_t *dest, const uint8_t *src); /* return value is CLIENT_ID_SIZE */
41 41
42void host_to_net(uint8_t *num, uint16_t numbytes); 42void host_to_net(uint8_t *num, uint16_t numbytes);
43#define net_to_host(x, y) host_to_net(x, y) 43#define net_to_host(x, y) host_to_net(x, y)