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

Function icmap_get_r

exec/icmap.c:696–727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

694}
695
696cs_error_t icmap_get_r(
697 const icmap_map_t map,
698 const char *key_name,
699 void *value,
700 size_t *value_len,
701 icmap_value_types_t *type)
702{
703 cs_error_t res;
704 void *tmp_value;
705 size_t tmp_value_len;
706
707 res = icmap_get_ref_r(map, key_name, &tmp_value, &tmp_value_len, type);
708 if (res != CS_OK) {
709 return (res);
710 }
711
712 if (value == NULL) {
713 if (value_len != NULL) {
714 *value_len = tmp_value_len;
715 }
716 } else {
717 if (value_len == NULL || *value_len < tmp_value_len) {
718 return (CS_ERR_INVALID_PARAM);
719 }
720
721 *value_len = tmp_value_len;
722
723 memcpy(value, tmp_value, tmp_value_len);
724 }
725
726 return (CS_OK);
727}
728
729cs_error_t icmap_get(
730 const char *key_name,

Callers 4

icmap_getFunction · 0.85
icmap_get_string_rFunction · 0.85
icmap_get_int_rFunction · 0.85
totem_config_keyreadFunction · 0.85

Calls 1

icmap_get_ref_rFunction · 0.85

Tested by

no test coverage detected