Merge pull request #10910 from yuwata/list-cleanups

basic/list: tiny fixes
This commit is contained in:
Lennart Poettering 2018-11-26 14:19:03 +01:00 committed by GitHub
commit a666d07eac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
#include "macro.h"
/* The head of the linked list. Use this in the structure that shall
* contain the head of the linked list */
#define LIST_HEAD(t,name) \
@ -13,8 +15,8 @@
/* Initialize the list's head */
#define LIST_HEAD_INIT(head) \
do { \
(head) = NULL; } \
while (false)
(head) = NULL; \
} while (false)
/* Initialize a list item */
#define LIST_INIT(name,item) \