From 5d74cf0092b132bf224024548e46566033c84937 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 5 Jan 2017 11:54:59 +0100 Subject: 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 --- login-utils/sulogin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'login-utils/sulogin.c') diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c index 8dc2b639d..5b8712bfe 100644 --- a/login-utils/sulogin.c +++ b/login-utils/sulogin.c @@ -827,8 +827,7 @@ static void usage(FILE *out) int main(int argc, char **argv) { - LIST_HEAD(consoles); - struct list_head *ptr; + struct list_head *ptr, consoles; struct console *con; char *tty = NULL; struct passwd *pwd; @@ -849,6 +848,8 @@ int main(int argc, char **argv) { NULL, 0, 0, 0 } }; + INIT_LIST_HEAD(&consoles); + /* * If we are init we need to set up a own session. */ -- cgit v1.2.3-55-g7522