OSDN Git Service

Merge declaration and initialization.
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 3 Apr 2008 19:18:14 +0000 (19:18 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 3 Apr 2008 19:18:14 +0000 (19:18 +0000)
Originally committed as revision 12676 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavutil/mem.c

index 033fcd5..4e654b0 100644 (file)
@@ -131,9 +131,7 @@ void av_freep(void *arg)
 
 void *av_mallocz(unsigned int size)
 {
-    void *ptr;
-
-    ptr = av_malloc(size);
+    void *ptr = av_malloc(size);
     if (ptr)
         memset(ptr, 0, size);
     return ptr;