Mercurial > libavcodec.hg
changeset 7119:39be110f531d libavcodec
Use sizeof() intead of hardcoding the values
author | vitor |
---|---|
date | Mon, 23 Jun 2008 20:53:05 +0000 |
parents | 83f0d3a52f14 |
children | c98b43981d89 |
files | ra144.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ra144.c Mon Jun 23 20:46:42 2008 +0000 +++ b/ra144.c Mon Jun 23 20:53:05 2008 +0000 @@ -162,7 +162,7 @@ new_val = ptr[10] - sum; if (new_val < -32768 || new_val > 32767) { - memset(in, 0, 100); + memset(in, 0, 50*sizeof(*in)); return; } @@ -224,7 +224,7 @@ m[2] = ((cb2_base[cb2_idx] >> 4) * gval) >> 8; memmove(ractx->adapt_cb, ractx->adapt_cb + BLOCKSIZE, - (BUFFERSIZE - BLOCKSIZE) * 2); + (BUFFERSIZE - BLOCKSIZE) * sizeof(*ractx->adapt_cb)); block = ractx->adapt_cb + BUFFERSIZE - BLOCKSIZE;