Mercurial > libavcodec.hg
changeset 3074:d89dcf01cae2 libavcodec
long is better than int for pointer differences
patch by Dieter <freebsd at sopwith solgatos com>
author | mru |
---|---|
date | Mon, 30 Jan 2006 22:59:09 +0000 |
parents | 9f486bcad2d3 |
children | 961af1358c7f |
files | mem.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mem.c Mon Jan 30 00:22:41 2006 +0000 +++ b/mem.c Mon Jan 30 22:59:09 2006 +0000 @@ -46,7 +46,7 @@ { void *ptr; #ifdef MEMALIGN_HACK - int diff; + long diff; #endif /* lets disallow possible ambiguous cases */ @@ -55,7 +55,7 @@ #ifdef MEMALIGN_HACK ptr = malloc(size+16+1); - diff= ((-(int)ptr - 1)&15) + 1; + diff= ((-(long)ptr - 1)&15) + 1; ptr += diff; ((char*)ptr)[-1]= diff; #elif defined (HAVE_MEMALIGN)