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/map/chrif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/chrif.c') diff --git a/src/map/chrif.c b/src/map/chrif.c index 5927e31bf..e9c3bbabf 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -88,7 +88,7 @@ struct chrif_interface chrif_s; //2b27: Incoming, chrif_authfail -> 'client authentication failed' //This define should spare writing the check in every function. [Skotlex] -#define chrif_check(a) { if(!chrif->isconnected()) return a; } +#define chrif_check(a) do { if(!chrif->isconnected()) return a; } while(0) /// Resets all the data. void chrif_reset(void) { -- cgit v1.2.3-70-g09d2