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

Function icmap_get_int_r

exec/icmap.c:773–798  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

771}
772
773static cs_error_t icmap_get_int_r(
774 const icmap_map_t map,
775 const char *key_name,
776 void *value,
777 icmap_value_types_t type)
778{
779 char key_value[16];
780 size_t key_size;
781 cs_error_t err;
782 icmap_value_types_t key_type;
783
784 key_size = sizeof(key_value);
785 memset(key_value, 0, key_size);
786
787 err = icmap_get_r(map, key_name, key_value, &key_size, &key_type);
788 if (err != CS_OK)
789 return (err);
790
791 if (key_type != type) {
792 return (CS_ERR_INVALID_PARAM);
793 }
794
795 memcpy(value, key_value, icmap_get_valuetype_len(key_type));
796
797 return (CS_OK);
798}
799
800cs_error_t icmap_get_int8_r(const icmap_map_t map, const char *key_name, int8_t *i8)
801{

Callers 10

icmap_get_int8_rFunction · 0.85
icmap_get_uint8_rFunction · 0.85
icmap_get_int16_rFunction · 0.85
icmap_get_uint16_rFunction · 0.85
icmap_get_int32_rFunction · 0.85
icmap_get_uint32_rFunction · 0.85
icmap_get_int64_rFunction · 0.85
icmap_get_uint64_rFunction · 0.85
icmap_get_float_rFunction · 0.85
icmap_get_double_rFunction · 0.85

Calls 2

icmap_get_rFunction · 0.85
icmap_get_valuetype_lenFunction · 0.85

Tested by

no test coverage detected