Merge pull request #10910 from yuwata/list-cleanups
basic/list: tiny fixes
This commit is contained in:
commit
a666d07eac
|
@ -1,6 +1,8 @@
|
||||||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "macro.h"
|
||||||
|
|
||||||
/* The head of the linked list. Use this in the structure that shall
|
/* The head of the linked list. Use this in the structure that shall
|
||||||
* contain the head of the linked list */
|
* contain the head of the linked list */
|
||||||
#define LIST_HEAD(t,name) \
|
#define LIST_HEAD(t,name) \
|
||||||
|
@ -13,8 +15,8 @@
|
||||||
/* Initialize the list's head */
|
/* Initialize the list's head */
|
||||||
#define LIST_HEAD_INIT(head) \
|
#define LIST_HEAD_INIT(head) \
|
||||||
do { \
|
do { \
|
||||||
(head) = NULL; } \
|
(head) = NULL; \
|
||||||
while (false)
|
} while (false)
|
||||||
|
|
||||||
/* Initialize a list item */
|
/* Initialize a list item */
|
||||||
#define LIST_INIT(name,item) \
|
#define LIST_INIT(name,item) \
|
||||||
|
|
Loading…
Reference in a new issue