[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec mem.c,1.17,1.18

Måns Rullgård CVS mru
Mon Jan 30 23:59:11 CET 2006


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv30838/libavcodec

Modified Files:
	mem.c 
Log Message:
long is better than int for pointer differences
patch by Dieter <freebsd at sopwith solgatos com>


Index: mem.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mem.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- mem.c	24 Jan 2006 10:33:13 -0000	1.17
+++ mem.c	30 Jan 2006 22:59:09 -0000	1.18
@@ -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)





More information about the ffmpeg-cvslog mailing list