MCPcopy Create free account
hub / github.com/corosync/corosync / cmap_get_int

Function cmap_get_int

lib/cmap.c:638–665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

636}
637
638static cs_error_t cmap_get_int(
639 cmap_handle_t handle,
640 const char *key_name,
641 void *value,
642 size_t value_size,
643 cmap_value_types_t type)
644{
645 char key_value[16];
646 size_t key_size;
647 cs_error_t err;
648
649 cmap_value_types_t key_type;
650
651 key_size = sizeof(key_value);
652 memset(key_value, 0, key_size);
653
654 err = cmap_get(handle, key_name, key_value, &key_size, &key_type);
655 if (err != CS_OK)
656 return (err);
657
658 if (key_type != type) {
659 return (CS_ERR_INVALID_PARAM);
660 }
661
662 memcpy(value, key_value, value_size);
663
664 return (CS_OK);
665}
666
667cs_error_t cmap_get_int8(cmap_handle_t handle, const char *key_name, int8_t *i8)
668{

Callers 10

cmap_get_int8Function · 0.85
cmap_get_uint8Function · 0.85
cmap_get_int16Function · 0.85
cmap_get_uint16Function · 0.85
cmap_get_int32Function · 0.85
cmap_get_uint32Function · 0.85
cmap_get_int64Function · 0.85
cmap_get_uint64Function · 0.85
cmap_get_floatFunction · 0.85
cmap_get_doubleFunction · 0.85

Calls 1

cmap_getFunction · 0.85

Tested by

no test coverage detected