Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373695
b: refs/heads/master
c: edb749f
h: refs/heads/master
i:
  373693: b2bc570
  373691: d036c7f
  373687: 8901447
  373679: 629c3a2
  373663: 2ca1c9f
  373631: 997ec41
v: v3
  • Loading branch information
Benjamin Poirier authored and Yann E. MORIN committed Apr 16, 2013
1 parent db1c31e commit a250d99
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a45c7dfb942b6c198d5cd283f8dcee145241a017
refs/heads/master: edb749f4390b3c1604233dc7c4fb0361f472e712
13 changes: 13 additions & 0 deletions trunk/scripts/kconfig/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ struct list_head {
&pos->member != (head); \
pos = list_entry(pos->member.next, typeof(*pos), member))

/**
* list_for_each_entry_safe - iterate over list of given type safe against removal of list entry
* @pos: the type * to use as a loop cursor.
* @n: another type * to use as temporary storage
* @head: the head for your list.
* @member: the name of the list_struct within the struct.
*/
#define list_for_each_entry_safe(pos, n, head, member) \
for (pos = list_entry((head)->next, typeof(*pos), member), \
n = list_entry(pos->member.next, typeof(*pos), member); \
&pos->member != (head); \
pos = n, n = list_entry(n->member.next, typeof(*n), member))

/**
* list_empty - tests whether a list is empty
* @head: the list to test.
Expand Down
3 changes: 3 additions & 0 deletions trunk/scripts/kconfig/mconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ static void search_conf(void)
.targets = targets,
.keys = keys,
};
struct jump_key *pos, *tmp;

res = get_relations_str(sym_arr, &head);
dres = show_textbox_ext(_("Search Results"), (char *)
Expand All @@ -402,6 +403,8 @@ static void search_conf(void)
again = true;
}
str_free(&res);
list_for_each_entry_safe(pos, tmp, &head, entries)
free(pos);
} while (again);
free(sym_arr);
str_free(&title);
Expand Down

0 comments on commit a250d99

Please sign in to comment.