| 90 | } |
| 91 | |
| 92 | GHashTable * |
| 93 | node_hash_from_list(GListPtr list) |
| 94 | { |
| 95 | GListPtr gIter = list; |
| 96 | GHashTable *result = g_hash_table_new_full(crm_str_hash, g_str_equal, NULL, g_hash_destroy_str); |
| 97 | |
| 98 | for (; gIter != NULL; gIter = gIter->next) { |
| 99 | node_t *node = (node_t *) gIter->data; |
| 100 | node_t *n = node_copy(node); |
| 101 | |
| 102 | g_hash_table_insert(result, (gpointer) n->details->id, n); |
| 103 | } |
| 104 | |
| 105 | return result; |
| 106 | } |
| 107 | |
| 108 | GListPtr |
| 109 | node_list_dup(GListPtr list1, gboolean reset, gboolean filter) |
no test coverage detected