diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2016-03-17 17:55:34 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2016-03-17 17:55:34 +0000 |
commit | 10d348fb0422aec8c3ed708d14327d2ab4b0cc2c (patch) | |
tree | 6fa41cbf00108d54661d5fddab9abb41f9e3333e /lib/libc | |
parent | f81db4c6f046d77ff99966a777e45b37b9e8896c (diff) |
properly guard to macros
ok otto@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdlib/malloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index 0fa0d39b8f5..89c8bbb9007 100644 --- a/lib/libc/stdlib/malloc.c +++ b/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 <otto@drijf.net> * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> @@ -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 { |