Skip to content

Commit

Permalink
common: Wrap ContainerOf around parentheses to allow direct struct ac…
Browse files Browse the repository at this point in the history
…cess

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12916 d7cf8633-e32d-0410-b094-e92efae38249
  • Loading branch information
cloudwalk committed Sep 8, 2020
1 parent 5cfa54f commit b38d93a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common.h
Expand Up @@ -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
{
Expand Down

0 comments on commit b38d93a

Please sign in to comment.