remove redundant temp pointer assignment in AVI_write_frame.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 27 Jan 2013 12:03:20 +0000 (12:03 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 27 Jan 2013 12:03:20 +0000 (12:03 +0000)
source/blender/avi/intern/avi.c

index d6301b723a79813c85aeb5997e85bd12c376bd0c..fcc9526b58a0746efa6a727a71d0a62add16ab5f 100644 (file)
@@ -950,7 +950,6 @@ AviError AVI_write_frame(AviMovie *movie, int frame_num, ...)
 {
        AviList list;
        AviChunk chunk;
-       AviIndexEntry *temp;
        va_list ap;
        int stream;
        int64_t rec_off;
@@ -965,15 +964,7 @@ AviError AVI_write_frame(AviMovie *movie, int frame_num, ...)
 
        if (frame_num + 1 > movie->index_entries) {
                const size_t entry_size = (movie->header->Streams + 1) * sizeof(AviIndexEntry);
-
-               if (movie->entries != NULL) {
-                       temp = (AviIndexEntry *)MEM_recallocN(movie->entries, (frame_num + 1) * entry_size);
-               }
-               else {
-                       temp = (AviIndexEntry *) MEM_callocN((frame_num + 1) * entry_size, "newidxentry");
-               }
-
-               movie->entries = temp;
+               movie->entries = (AviIndexEntry *)MEM_recallocN(movie->entries, (frame_num + 1) * entry_size);
                movie->index_entries = frame_num + 1;
        }