From: cloudwalk Date: Tue, 8 Sep 2020 13:19:28 +0000 (+0000) Subject: common: Wrap ContainerOf around parentheses to allow direct struct access X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b38d93ab1382a2c2beca0c4f0b6af1f0797cfee6;p=xonotic%2Fdarkplaces.git common: Wrap ContainerOf around parentheses to allow direct struct access git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12916 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/common.h b/common.h index 9d73bc54..b38f830d 100644 --- a/common.h +++ b/common.h @@ -38,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //============================================================================ -#define ContainerOf(ptr, type, member) (type *)((void *)&(ptr) - offsetof(type, member)) +#define ContainerOf(ptr, type, member) ((type *)((void *)&(ptr) - offsetof(type, member))) typedef struct sizebuf_s {