From 71aec6978307824721d23b0538cbbbefeb4bc2bd Mon Sep 17 00:00:00 2001 From: mmcc <> Date: Thu, 17 Mar 2016 17:55:33 +0000 Subject: [PATCH] properly guard to macros ok otto@ --- src/lib/libc/stdlib/malloc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index 0fa0d39b..89c8bbb9 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/lib/libc/stdlib/malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.c,v 1.184 2016/03/14 17:20:26 otto Exp $ */ +/* $OpenBSD: malloc.c,v 1.185 2016/03/17 17:55:33 mmcc Exp $ */ /* * Copyright (c) 2008, 2010, 2011 Otto Moerbeek * Copyright (c) 2012 Matthew Dempsky @@ -93,13 +93,13 @@ #define MQUERY(a, sz) mquery((a), (size_t)(sz), PROT_READ | PROT_WRITE, \ MAP_ANON | MAP_PRIVATE | MAP_FIXED, -1, (off_t)0) -#define _MALLOC_LEAVE(d) if (__isthreaded) do { \ +#define _MALLOC_LEAVE(d) do { if (__isthreaded) { \ (d)->active--; \ - _MALLOC_UNLOCK(); \ + _MALLOC_UNLOCK(); } \ } while (0) -#define _MALLOC_ENTER(d) if (__isthreaded) do { \ +#define _MALLOC_ENTER(d) do { if (__isthreaded) { \ _MALLOC_LOCK(); \ - (d)->active++; \ + (d)->active++; } \ } while (0) struct region_info {