diff options
author | Karel Zak | 2017-01-05 11:54:59 +0100 |
---|---|---|
committer | Karel Zak | 2017-01-05 11:54:59 +0100 |
commit | 5d74cf0092b132bf224024548e46566033c84937 (patch) | |
tree | c5741b9311f215f8111f6743115480c3e1631e6a /include/list.h | |
parent | sfdisk: unused parameter 'sf' [-Wunused-parameter] (diff) | |
download | kernel-qcow2-util-linux-5d74cf0092b132bf224024548e46566033c84937.tar.gz kernel-qcow2-util-linux-5d74cf0092b132bf224024548e46566033c84937.tar.xz kernel-qcow2-util-linux-5d74cf0092b132bf224024548e46566033c84937.zip |
lib/list: remove LIST_HEAD macro
* the variable definition with hidden type is always horrible, for
example:
int func() {
LIST_HEAD(foo);
...
}
the more readable is:
int func() {
struct list_head foo;
INIT_LIST_HEAD(&foo);
...
}
* the name LIST_HEAD conflict with /usr/include/sys/queue.h
* we use it only on two places in sulogin
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/list.h')
-rw-r--r-- | include/list.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/include/list.h b/include/list.h index 3c08aa5f2..cf022fb22 100644 --- a/include/list.h +++ b/include/list.h @@ -33,11 +33,6 @@ struct list_head { struct list_head *next, *prev; }; -#define LIST_HEAD_INIT(name) { &(name), &(name) } - -#define LIST_HEAD(name) \ - struct list_head name = LIST_HEAD_INIT(name) - #define INIT_LIST_HEAD(ptr) do { \ (ptr)->next = (ptr); (ptr)->prev = (ptr); \ } while (0) |