[Swfed-svn] swfed-svn [68] 変数名の見直し old_buff => old_buff_ref ( 間違って free されないように )

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 10月 10日 (金) 19:43:19 JST


Revision: 68
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=swfed&view=rev&rev=68
Author:   yoya
Date:     2008-10-10 19:43:19 +0900 (Fri, 10 Oct 2008)

Log Message:
-----------
変数名の見直し old_buff => old_buff_ref (間違って free されないように)

Modified Paths:
--------------
    trunk/src/swf_object.c


-------------- next part --------------
Modified: trunk/src/swf_object.c
===================================================================
--- trunk/src/swf_object.c	2008-10-10 10:37:28 UTC (rev 67)
+++ trunk/src/swf_object.c	2008-10-10 10:43:19 UTC (rev 68)
@@ -54,12 +54,12 @@
         ; // OK
     } else if (memcmp(swf->header.magic, "CWS", 3) == 0) {
         int result;
-        unsigned char *old_buff, *new_buff;
+        unsigned char *old_buff_ref, *new_buff;
         unsigned long origsize;
-        old_buff = bitstream_buffer(bs, SWF_HEADER_SIZE);
+        old_buff_ref = bitstream_buffer(bs, SWF_HEADER_SIZE);
         origsize = swf->header.file_length - SWF_HEADER_SIZE;
         new_buff = malloc(origsize);
-        result = uncompress(new_buff, &origsize, old_buff, bs->data_len - SWF_HEADER_SIZE);
+        result = uncompress(new_buff, &origsize, old_buff_ref, bs->data_len - SWF_HEADER_SIZE);
         if (result != Z_OK) {
             if (result == Z_MEM_ERROR) {
                 fprintf(stderr, "swf_object_input: uncompress Z_MEM_ERROR: can't malloc\n");
@@ -131,11 +131,11 @@
     } else if (memcmp(swf->header.magic, "CWS", SWF_MAGIC_SIZE) == 0) {
         int result;
         unsigned long compsize;
-        unsigned char *new_buff, *old_buff;
+        unsigned char *new_buff, *old_buff_ref;
         bitstream_setpos(bs, SWF_HEADER_SIZE, 0);
-        old_buff = bitstream_buffer(bs, SWF_HEADER_SIZE);
+        old_buff_ref = bitstream_buffer(bs, SWF_HEADER_SIZE);
         new_buff = malloc(swf->header.file_length - SWF_HEADER_SIZE);
-        result = compress(new_buff, &compsize, old_buff,
+        result = compress(new_buff, &compsize, old_buff_ref,
                           bs->data_len - SWF_HEADER_SIZE);
         if (result != Z_OK) {
             if (result == Z_MEM_ERROR) {


Swfed-svn メーリングリストの案内
Back to archive index