| 233 | static const struct corosync_api_v1 *api; |
| 234 | |
| 235 | static void stats_map_set_value(struct cs_stats_conv *conv, |
| 236 | void *stat_array, |
| 237 | void *value, |
| 238 | size_t *value_len, |
| 239 | icmap_value_types_t *type) |
| 240 | { |
| 241 | if (value_len) { |
| 242 | *value_len = icmap_get_valuetype_len(conv->value_type); |
| 243 | } |
| 244 | if (type) { |
| 245 | *type = conv->value_type; |
| 246 | if ((*type == ICMAP_VALUETYPE_STRING) && value_len && stat_array) { |
| 247 | *value_len = strlen((char *)(stat_array) + conv->offset)+1; |
| 248 | } |
| 249 | } |
| 250 | if (value) { |
| 251 | assert(value_len != NULL); |
| 252 | |
| 253 | memcpy(value, (char *)(stat_array) + conv->offset, *value_len); |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | static void stats_add_entry(const char *key, struct cs_stats_conv *cs_conv) |
| 258 | { |
no test coverage detected