tools/firewire: nosy-dump: change to kernel coding style

This changes only
  - whitespace
  - C99 initializers
  - comment style
  - order of #includes
  - if { } else { } bracing

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
This commit is contained in:
Stefan Richter
2010-07-22 11:58:05 +02:00
parent a8461c0f3b
commit 92c16f7e9c
4 changed files with 1064 additions and 1117 deletions

View File

@ -1,46 +1,46 @@
struct list {
struct list *next, *prev;
struct list *next, *prev;
};
static inline void
list_init(struct list *list)
{
list->next = list;
list->prev = list;
list->next = list;
list->prev = list;
}
static inline int
list_empty(struct list *list)
{
return list->next == list;
return list->next == list;
}
static inline void
list_insert(struct list *link, struct list *new_link)
{
new_link->prev = link->prev;
new_link->next = link;
new_link->prev->next = new_link;
new_link->next->prev = new_link;
new_link->prev = link->prev;
new_link->next = link;
new_link->prev->next = new_link;
new_link->next->prev = new_link;
}
static inline void
list_append(struct list *list, struct list *new_link)
{
list_insert((struct list *)list, new_link);
list_insert((struct list *)list, new_link);
}
static inline void
list_prepend(struct list *list, struct list *new_link)
{
list_insert(list->next, new_link);
list_insert(list->next, new_link);
}
static inline void
list_remove(struct list *link)
{
link->prev->next = link->next;
link->next->prev = link->prev;
link->prev->next = link->next;
link->next->prev = link->prev;
}
#define list_entry(link, type, member) \