diff --git a/src/core/ddsi/include/dds/ddsi/q_whc.h b/src/core/ddsi/include/dds/ddsi/q_whc.h index 5e53e309f0..d69b80b104 100644 --- a/src/core/ddsi/include/dds/ddsi/q_whc.h +++ b/src/core/ddsi/include/dds/ddsi/q_whc.h @@ -45,7 +45,7 @@ struct whc_state { an iter on the stack without specifying an implementation. If future changes or implementations require more, these can be adjusted. An implementation should check things fit at compile time. */ -#define WHC_SAMPLE_ITER_SIZE (7 * sizeof(void *)) +#define WHC_SAMPLE_ITER_SIZE (8 * sizeof(void *)) struct whc_sample_iter_base { struct whc *whc; }; diff --git a/src/core/ddsi/src/ddsi_entity.c b/src/core/ddsi/src/ddsi_entity.c index 9398b3f519..4428e71173 100644 --- a/src/core/ddsi/src/ddsi_entity.c +++ b/src/core/ddsi/src/ddsi_entity.c @@ -42,7 +42,8 @@ int ddsi_compare_guid (const void *va, const void *vb) int ddsi_compare_entityid (const void *va, const void *vb) { - return memcmp (va, vb, sizeof (ddsi_entityid_t)); + const ddsi_entityid_t *a = va, *b = vb; + return (a->u == b->u) ? 0 : ((a->u < b->u) ? -1 : 1); } bool ddsi_is_null_guid (const ddsi_guid_t *guid)