]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/list: remove LIST_HEAD macro
authorKarel Zak <kzak@redhat.com>
Thu, 5 Jan 2017 10:54:59 +0000 (11:54 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 5 Jan 2017 10:54:59 +0000 (11:54 +0100)
commit5d74cf0092b132bf224024548e46566033c84937
treec5741b9311f215f8111f6743115480c3e1631e6a
parent11e1097e6c6d499228c84609523d8d1976be21a3
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>
include/list.h
login-utils/sulogin-consoles.c
login-utils/sulogin.c