Skip to content

Commit

Permalink
UCP/RKEY: static assert to check mem type can pack in uint8_t
Browse files Browse the repository at this point in the history
  • Loading branch information
bureddy committed Oct 29, 2018
1 parent 5a6dd09 commit 163f107
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ucp/core/ucp_rkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ ssize_t ucp_rkey_pack_uct(ucp_context_h context, ucp_md_map_t md_map,
p += sizeof(ucp_md_map_t);

/* Write memory type */
UCS_STATIC_ASSERT(UCT_MD_MEM_TYPE_LAST <= 255);
*((uint8_t*)p++) = mem_type;

/* Write both size and rkey_buffer for each UCT rkey */
Expand Down

0 comments on commit 163f107

Please sign in to comment.