Lines Matching refs:node
50 HashNode *node = (HashNode *)root; in GetHashNodeByNode() local
51 while (node != NULL) { in GetHashNodeByNode()
52 int ret = tab->nodeCompare(node, new); in GetHashNodeByNode()
54 return node; in GetHashNodeByNode()
56 node = node->next; in GetHashNodeByNode()
64 HashNode *node = (HashNode *)root; in GetHashNodeByKey() local
65 while (node != NULL) { in GetHashNodeByKey()
66 int ret = keyCompare(node, key); in GetHashNodeByKey()
68 return node; in GetHashNodeByKey()
70 node = node->next; in GetHashNodeByKey()
75 int32_t OH_HashMapAdd(HashMapHandle handle, HashNode *node) in OH_HashMapAdd() argument
78 INIT_ERROR_CHECK(node != NULL && node->next == NULL, return -1, "Invalid param"); in OH_HashMapAdd()
80 int hashCode = tab->nodeHash(node); in OH_HashMapAdd()
86 HashNode *tmp = GetHashNodeByNode(tab, tab->buckets[hashCode], node); in OH_HashMapAdd()
91 node->next = tab->buckets[hashCode]; in OH_HashMapAdd()
92 tab->buckets[hashCode] = node; in OH_HashMapAdd()
106 HashNode *node = tab->buckets[hashCode]; in OH_HashMapRemove() local
107 HashNode *preNode = node; in OH_HashMapRemove()
108 while (node != NULL) { in OH_HashMapRemove()
109 int ret = tab->keyCompare(node, key); in OH_HashMapRemove()
111 if (node == tab->buckets[hashCode]) { in OH_HashMapRemove()
112 tab->buckets[hashCode] = node->next; in OH_HashMapRemove()
114 preNode->next = node->next; in OH_HashMapRemove()
118 preNode = node; in OH_HashMapRemove()
119 node = node->next; in OH_HashMapRemove()
140 HashNode *node = root; in HashListFree() local
141 while (node != NULL) { in HashListFree()
142 HashNode *next = node->next; in HashListFree()
144 tab->nodeFree(node); in HashListFree()
146 node = next; in HashListFree()
171 void OH_HashMapTraverse(HashMapHandle handle, void (*hashNodeTraverse)(const HashNode *node, const … in OH_HashMapTraverse() argument
177 HashNode *node = tab->buckets[i]; in OH_HashMapTraverse() local
178 while (node != NULL) { in OH_HashMapTraverse()
179 HashNode *next = node->next; in OH_HashMapTraverse()
180 hashNodeTraverse(node, context); in OH_HashMapTraverse()
181 node = next; in OH_HashMapTraverse()
191 HashNode *node = tab->buckets[i]; in OH_HashMapIsEmpty() local
192 if (node != NULL) { in OH_HashMapIsEmpty()