diff options
Diffstat (limited to 'vp8/common/common.h')
-rw-r--r-- | vp8/common/common.h | 12 |
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" |