Changeset ce572d7eec691f6ee486f88c8fe215e99d5b4dd8

Show
Ignore:
Timestamp:
09/12/07 00:01:04 (1 year ago)
Author:
Christophe Mutricy <xtophe@videolan.org>
git-committer:
Christophe Mutricy <xtophe@videolan.org> 1189548064 +0000
git-parent:

[2e71482d26bc4b06e80130b2c5dda4c6f7df9ef3]

git-author:
Christophe Mutricy <xtophe@videolan.org> 1189548064 +0000
Message:

Remove always true tests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/text/strings.c

    re02432e rce572d7  
    655655 
    656656/* same than INSERT_STRING, except that string won't be freed */ 
    657 #define INSERT_STRING_NO_FREE( check, string )                           \ 
    658                     if( check && string )                           \ 
     657#define INSERT_STRING_NO_FREE( string )                             \ 
    659658                    {                                               \ 
    660659                            int len = strlen( string );             \ 
     
    664663                            d += len;                               \ 
    665664                            free( string );                         \ 
    666                     }                                               \ 
    667                     else                                            \ 
    668                     {                                               \ 
    669                             *d = '-';                               \ 
    670                             d++;                                    \ 
    671                     } 
     665                    }                                                
    672666char *__str_format_meta( vlc_object_t *p_object, const char *string ) 
    673667{ 
     
    762756                        sprintf( buf, b_empty_if_na ? "" : "-" ); 
    763757                    } 
    764                     INSERT_STRING_NO_FREE( 1, buf ); 
     758                    INSERT_STRING_NO_FREE( buf ); 
    765759                    break; 
    766760                case 'C': 
     
    774768                        sprintf( buf, b_empty_if_na ? "" : "-" ); 
    775769                    } 
    776                     INSERT_STRING_NO_FREE( 1, buf ); 
     770                    INSERT_STRING_NO_FREE( buf ); 
    777771                    break; 
    778772                case 'D': 
     
    789783                        sprintf( buf, b_empty_if_na ? "" : "--:--:--" ); 
    790784                    } 
    791                     INSERT_STRING_NO_FREE( 1, buf ); 
     785                    INSERT_STRING_NO_FREE( buf ); 
    792786                    break; 
    793787                case 'F': 
     
    804798                        sprintf( buf, b_empty_if_na ? "" : "-" ); 
    805799                    } 
    806                     INSERT_STRING_NO_FREE( 1, buf ); 
     800                    INSERT_STRING_NO_FREE( buf ); 
    807801                    break; 
    808802                case 'L': 
     
    820814                        sprintf( buf, b_empty_if_na ? "" : "--:--:--" ); 
    821815                    } 
    822                     INSERT_STRING_NO_FREE( 1, buf ); 
     816                    INSERT_STRING_NO_FREE( buf ); 
    823817                    break; 
    824818                case 'N': 
     
    849843                        sprintf( buf, b_empty_if_na ? "" : "--.-%%" ); 
    850844                    } 
    851                     INSERT_STRING_NO_FREE( 1, buf ); 
     845                    INSERT_STRING_NO_FREE( buf ); 
    852846                    break; 
    853847                case 'R': 
     
    861855                        sprintf( buf, b_empty_if_na ? "" : "-" ); 
    862856                    } 
    863                     INSERT_STRING_NO_FREE( 1, buf ); 
     857                    INSERT_STRING_NO_FREE( buf ); 
    864858                    break; 
    865859                case 'S': 
     
    873867                        sprintf( buf, b_empty_if_na ? "" : "-" ); 
    874868                    } 
    875                     INSERT_STRING_NO_FREE( 1, buf ); 
     869                    INSERT_STRING_NO_FREE( buf ); 
    876870                    break; 
    877871                case 'T': 
     
    887881                        sprintf( buf, b_empty_if_na ? "" :  "--:--:--" ); 
    888882                    } 
    889                     INSERT_STRING_NO_FREE( 1, buf ); 
     883                    INSERT_STRING_NO_FREE( buf ); 
    890884                    break; 
    891885                case 'U': 
     
    897891                    aout_VolumeGet( p_object, &volume ); 
    898892                    snprintf( buf, 10, "%d", volume ); 
    899                     INSERT_STRING_NO_FREE( 1, buf ); 
     893                    INSERT_STRING_NO_FREE( buf ); 
    900894                    break; 
    901895                }