From 43d34d2473917521376f7d56126779f941205105 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Fri, 18 Jul 2014 19:51:15 +0200
Subject: 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.
---
src/kike.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
(limited to 'src/kike.c')
diff --git a/src/kike.c b/src/kike.c
index 7278363..1ca6b0c 100644
--- a/src/kike.c
+++ b/src/kike.c
@@ -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[];
--
cgit v1.2.3