From 12dce46d611d6ea7c772174ebbd555fa10fead99 Mon Sep 17 00:00:00 2001 From: Haru Date: Mon, 18 Nov 2013 08:53:22 +0100 Subject: Sanitized and improved several macros through the code - Sanitized all potentially unsafe macros (related eA:15259) - Improved some function-like macros to evaluate their argument only once and keep it in a temporary variable. This improves performance in the damage calculation related code. Signed-off-by: Haru --- src/common/network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/network.c') diff --git a/src/common/network.c b/src/common/network.c index 1f1621363..a40cbd602 100644 --- a/src/common/network.c +++ b/src/common/network.c @@ -50,7 +50,7 @@ SESSION g_Session[MAXCONN]; static bool onSend(int32 fd); -#define _network_free_netbuf_async( buf ) add_timer( 0, _network_async_free_netbuf_proc, 0, (intptr_t) buf) +#define _network_free_netbuf_async( buf ) add_timer( 0, _network_async_free_netbuf_proc, 0, (intptr_t)(buf)) static int _network_async_free_netbuf_proc(int tid, unsigned int tick, int id, intptr_t data){ // netbuf is in data netbuffer_put( (netbuf)data ); -- cgit v1.2.3-70-g09d2