summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/common/vp9_common.h')
-rw-r--r--vp9/common/vp9_common.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/vp9/common/vp9_common.h b/vp9/common/vp9_common.h
index e3c5535dd..9048b515b 100644
--- a/vp9/common/vp9_common.h
+++ b/vp9/common/vp9_common.h
@@ -27,17 +27,17 @@ extern "C" {
// Only need this for fixed-size arrays, for structs just assign.
#define vp9_copy(dest, src) \
- { \
+ do { \
assert(sizeof(dest) == sizeof(src)); \
memcpy(dest, src, sizeof(src)); \
- }
+ } while (0)
// Use this for variably-sized arrays.
#define vp9_copy_array(dest, src, n) \
- { \
+ do { \
assert(sizeof(*(dest)) == sizeof(*(src))); \
memcpy(dest, src, (n) * sizeof(*(src))); \
- }
+ } while (0)
#define vp9_zero(dest) memset(&(dest), 0, sizeof(dest))
#define vp9_zero_array(dest, n) memset(dest, 0, (n) * sizeof(*(dest)))