Skip to content

Commit

Permalink
Replace memcpy in ddsi_compare_entityid and increased WHC_SAMPLE_ITER…
Browse files Browse the repository at this point in the history
…_SIZE to fix 32 bits builds

Signed-off-by: Dennis Potman <[email protected]>
  • Loading branch information
dpotman authored and eboasson committed Aug 23, 2022
1 parent 2864bd2 commit 65e8d8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/ddsi/include/dds/ddsi/q_whc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
3 changes: 2 additions & 1 deletion src/core/ddsi/src/ddsi_entity.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 65e8d8f

Please sign in to comment.