Changeset 7c2d9c9b74261d773cbce34e0243f28c99157f34

Show
Ignore:
Timestamp:
05/30/08 18:07:12 (3 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1212163632 +0300
git-parent:

[84207844e7c0a51fbe16693ead8698c1db0e1b4f]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1212163626 +0300
Message:

block_Realloc: shortcut the release case

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/misc/block.c

    rc4e0f18 r7c2d9c9  
    107107{ 
    108108    block_sys_t *p_sys = (block_sys_t *)p_block; 
    109     ssize_t i_buffer_size; 
     109    ssize_t i_buffer_size = i_prebody + i_body; 
     110 
     111    if( i_buffer_size <= 0 ) 
     112    { 
     113        block_Release( p_block ); 
     114        return NULL; 
     115    } 
    110116 
    111117    if( p_block->pf_release != BlockRelease ) 
     
    119125 
    120126        p_block = p_dup; 
    121     } 
    122  
    123     i_buffer_size = i_prebody + i_body; 
    124  
    125     if( i_buffer_size <= 0 ) 
    126     { 
    127         block_Release( p_block ); 
    128         return NULL; 
    129127    } 
    130128