From 7dc0f118a4b2752e887afecc2d95686651e811ba Mon Sep 17 00:00:00 2001 From: Dmitry Simonenko Date: Tue, 20 Jun 2017 18:43:46 +0300 Subject: [PATCH] odissey: fix id comparator --- src/od_id.h | 2 +- src/odissey.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/od_id.h b/src/od_id.h index a35cd9b6..95a45d49 100644 --- a/src/od_id.h +++ b/src/od_id.h @@ -32,7 +32,7 @@ void od_idmgr_generate(od_idmgr_t*, od_id_t*); static inline int od_idmgr_cmp(od_id_t *a, od_id_t *b) { - return *(uint64_t*)a->id == *(uint64_t*)b->id; + return memcmp(a->id, b->id, sizeof(a->id)) == 0; } #endif /* OD_ID_H */ diff --git a/src/odissey.c b/src/odissey.c index 7c80434f..da25599c 100644 --- a/src/odissey.c +++ b/src/odissey.c @@ -9,6 +9,7 @@ #include #include #include +#include #include