Lines Matching refs:cur
46 sidtab_node_t *prev, *cur, *newnode; in sepol_sidtab_insert() local
53 cur = s->htable[hvalue]; in sepol_sidtab_insert()
54 while (cur != NULL && sid > cur->sid) { in sepol_sidtab_insert()
55 prev = cur; in sepol_sidtab_insert()
56 cur = cur->next; in sepol_sidtab_insert()
59 if (cur && sid == cur->sid) { in sepol_sidtab_insert()
90 sidtab_node_t *cur, *last; in sepol_sidtab_remove() local
97 cur = s->htable[hvalue]; in sepol_sidtab_remove()
98 while (cur != NULL && sid > cur->sid) { in sepol_sidtab_remove()
99 last = cur; in sepol_sidtab_remove()
100 cur = cur->next; in sepol_sidtab_remove()
103 if (cur == NULL || sid != cur->sid) in sepol_sidtab_remove()
107 s->htable[hvalue] = cur->next; in sepol_sidtab_remove()
109 last->next = cur->next; in sepol_sidtab_remove()
111 context_destroy(&cur->context); in sepol_sidtab_remove()
113 free(cur); in sepol_sidtab_remove()
121 sidtab_node_t *cur; in sepol_sidtab_search() local
127 cur = s->htable[hvalue]; in sepol_sidtab_search()
128 while (cur != NULL && sid > cur->sid) in sepol_sidtab_search()
129 cur = cur->next; in sepol_sidtab_search()
131 if (cur == NULL || sid != cur->sid) { in sepol_sidtab_search()
135 cur = s->htable[hvalue]; in sepol_sidtab_search()
136 while (cur != NULL && sid > cur->sid) in sepol_sidtab_search()
137 cur = cur->next; in sepol_sidtab_search()
138 if (!cur || sid != cur->sid) in sepol_sidtab_search()
142 return &cur->context; in sepol_sidtab_search()
151 sidtab_node_t *cur; in sepol_sidtab_map() local
157 cur = s->htable[i]; in sepol_sidtab_map()
158 while (cur != NULL) { in sepol_sidtab_map()
159 ret = apply(cur->sid, &cur->context, args); in sepol_sidtab_map()
162 cur = cur->next; in sepol_sidtab_map()
174 sidtab_node_t *last, *cur, *temp; in sepol_sidtab_map_remove_on_error() local
181 cur = s->htable[i]; in sepol_sidtab_map_remove_on_error()
182 while (cur != NULL) { in sepol_sidtab_map_remove_on_error()
183 ret = apply(cur->sid, &cur->context, args); in sepol_sidtab_map_remove_on_error()
186 last->next = cur->next; in sepol_sidtab_map_remove_on_error()
188 s->htable[i] = cur->next; in sepol_sidtab_map_remove_on_error()
191 temp = cur; in sepol_sidtab_map_remove_on_error()
192 cur = cur->next; in sepol_sidtab_map_remove_on_error()
197 last = cur; in sepol_sidtab_map_remove_on_error()
198 cur = cur->next; in sepol_sidtab_map_remove_on_error()
211 sidtab_node_t *cur; in sepol_sidtab_search_context() local
214 cur = s->htable[i]; in sepol_sidtab_search_context()
215 while (cur != NULL) { in sepol_sidtab_search_context()
216 if (context_cmp(&cur->context, context)) in sepol_sidtab_search_context()
217 return cur->sid; in sepol_sidtab_search_context()
218 cur = cur->next; in sepol_sidtab_search_context()
263 sidtab_node_t *cur; in sepol_sidtab_hash_eval() local
268 cur = h->htable[i]; in sepol_sidtab_hash_eval()
269 if (cur) { in sepol_sidtab_hash_eval()
272 while (cur) { in sepol_sidtab_hash_eval()
274 cur = cur->next; in sepol_sidtab_hash_eval()
290 sidtab_ptr_t cur, temp; in sepol_sidtab_destroy() local
296 cur = s->htable[i]; in sepol_sidtab_destroy()
297 while (cur != NULL) { in sepol_sidtab_destroy()
298 temp = cur; in sepol_sidtab_destroy()
299 cur = cur->next; in sepol_sidtab_destroy()