summaryrefslogtreecommitdiff
path: root/vp8/common/common.h
diff options
context:
space:
mode:
authorJerome Jiang <jianj@google.com>2019-03-13 16:21:43 -0700
committerJerome Jiang <jianj@google.com>2019-03-14 14:57:33 -0700
commit1ece42aaf76c0b7e059fef5ef17c605cf1f5a478 (patch)
tree557473bb0d32c10c1b508180c72c2c5ecc5ddc04 /vp8/common/common.h
parent855a71dfda9fb2620ae5567a5bb0897aa4fc0d47 (diff)
downloadlibvpx-1ece42aaf76c0b7e059fef5ef17c605cf1f5a478.tar
libvpx-1ece42aaf76c0b7e059fef5ef17c605cf1f5a478.tar.gz
libvpx-1ece42aaf76c0b7e059fef5ef17c605cf1f5a478.tar.bz2
libvpx-1ece42aaf76c0b7e059fef5ef17c605cf1f5a478.zip
Enclose macro arguments in parentheses
BUG=webm:1606 Change-Id: I661485b860243c95b6450035dbac77b0dd4d9ff4
Diffstat (limited to 'vp8/common/common.h')
-rw-r--r--vp8/common/common.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/vp8/common/common.h b/vp8/common/common.h
index 8593e822b..2c30e8d6c 100644
--- a/vp8/common/common.h
+++ b/vp8/common/common.h
@@ -31,15 +31,15 @@ extern "C" {
/* Use this for variably-sized arrays. */
-#define vp8_copy_array(Dest, Src, N) \
- { \
- assert(sizeof(*Dest) == sizeof(*Src)); \
- memcpy(Dest, Src, N * sizeof(*Src)); \
+#define vp8_copy_array(Dest, Src, N) \
+ { \
+ assert(sizeof(*(Dest)) == sizeof(*(Src))); \
+ memcpy(Dest, Src, (N) * sizeof(*(Src))); \
}
-#define vp8_zero(Dest) memset(&Dest, 0, sizeof(Dest));
+#define vp8_zero(Dest) memset(&(Dest), 0, sizeof(Dest));
-#define vp8_zero_array(Dest, N) memset(Dest, 0, N * sizeof(*Dest));
+#define vp8_zero_array(Dest, N) memset(Dest, 0, (N) * sizeof(*(Dest)));
#ifdef __cplusplus
} // extern "C"