long is better than int for pointer differences
patch by Dieter <freebsd at sopwith solgatos com> Originally committed as revision 4911 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
6569497442
commit
ed96aeea64
@ -46,7 +46,7 @@ void *av_malloc(unsigned int size)
|
|||||||
{
|
{
|
||||||
void *ptr;
|
void *ptr;
|
||||||
#ifdef MEMALIGN_HACK
|
#ifdef MEMALIGN_HACK
|
||||||
int diff;
|
long diff;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* lets disallow possible ambiguous cases */
|
/* lets disallow possible ambiguous cases */
|
||||||
@ -55,7 +55,7 @@ void *av_malloc(unsigned int size)
|
|||||||
|
|
||||||
#ifdef MEMALIGN_HACK
|
#ifdef MEMALIGN_HACK
|
||||||
ptr = malloc(size+16+1);
|
ptr = malloc(size+16+1);
|
||||||
diff= ((-(int)ptr - 1)&15) + 1;
|
diff= ((-(long)ptr - 1)&15) + 1;
|
||||||
ptr += diff;
|
ptr += diff;
|
||||||
((char*)ptr)[-1]= diff;
|
((char*)ptr)[-1]= diff;
|
||||||
#elif defined (HAVE_MEMALIGN)
|
#elif defined (HAVE_MEMALIGN)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user