Add a LIST_HEADER macro

To save us from specifying the `next' and `prev' pointers all the time.

It's not perfect, just a tiny bit better.
This commit is contained in:
2014-07-18 19:51:15 +02:00
parent 353230b18b
commit 43d34d2473
3 changed files with 7 additions and 11 deletions

View File

@@ -215,9 +215,7 @@ enum
struct client
{
struct client *next; ///< The next link in a chain
struct client *prev; ///< The previous link in a chain
LIST_HEADER (client)
struct server_context *ctx; ///< Server context
int socket_fd; ///< The TCP socket
@@ -310,8 +308,7 @@ enum
struct channel_user
{
struct channel_user *prev;
struct channel_user *next;
LIST_HEADER (channel_user)
unsigned modes;
char nickname[];