diff options
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/DHT.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c index 2d3d6ffe..9ebe11cf 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c | |||
@@ -78,8 +78,8 @@ int id_closest(const uint8_t *id, const uint8_t *id1, const uint8_t *id2) | |||
78 | 78 | ||
79 | for (i = 0; i < CLIENT_ID_SIZE; ++i) { | 79 | for (i = 0; i < CLIENT_ID_SIZE; ++i) { |
80 | 80 | ||
81 | distance1 = abs(((int8_t *)id)[i] ^ ((int8_t *)id1)[i]); | 81 | distance1 = id[i] ^ id1[i]; |
82 | distance2 = abs(((int8_t *)id)[i] ^ ((int8_t *)id2)[i]); | 82 | distance2 = id[i] ^ id2[i]; |
83 | 83 | ||
84 | if (distance1 < distance2) | 84 | if (distance1 < distance2) |
85 | return 1; | 85 | return 1; |