]> git.sesse.net Git - vlc/commitdiff
"strlen( psz ) == 0" => "*psz == '\0'"
authorRémi Duraffort <ivoire@videolan.org>
Mon, 19 Apr 2010 10:35:06 +0000 (12:35 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Mon, 19 Apr 2010 18:12:45 +0000 (20:12 +0200)
modules/access/bda/bdagraph.cpp
modules/demux/mp4/libmp4.c
modules/demux/subtitle.c
modules/gui/ncurses.c
modules/stream_out/raop.c

index 1a19c7c50aec8f5cb835ffc56a258c985e6bbd20..1a41bb0d78195a7c2ca6a5a372c9abcd427174a0 100644 (file)
@@ -911,7 +911,7 @@ HRESULT BDAGraph::CreateTuneRequest()
 
             /* Test for a specific Tuning space name supplied on the command
              * line as dvb-networkname=xxx */
-            if( strlen( l.psz_network_name ) == 0 ||
+            if( *l.psz_network_name == '\0' ||
                 strcmp( l.psz_network_name, l.psz_bstr_name ) == 0 )
             {
                 msg_Dbg( p_access, "CreateTuneRequest: Using Tuning Space: %s",
@@ -1001,7 +1001,7 @@ HRESULT BDAGraph::CreateTuneRequest()
             l.psz_bstr_name = new char[ l.i_name_len ];
             l.i_name_len = WideCharToMultiByte( CP_ACP, 0, l.bstr_name, -1,
                 l.psz_bstr_name, l.i_name_len, NULL, NULL );
-            if( strlen( l.psz_network_name ) == 0 ||
+            if( *l.psz_network_name == '\0' ||
                 strcmp( l.psz_network_name, l.psz_bstr_name ) == 0 )
             {
                 msg_Dbg( p_access, "CreateTuneRequest: Using Tuning Space: %s",
index c84b74efd9b75ea948399f422743677538a62f80..411c2dd02d6a609315189cfde2f1bb8d77950e67 100644 (file)
@@ -3084,7 +3084,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result,
             }
         }
         else
-        if( strlen( psz_token ) == 0 )
+        if( *psz_token == '\0' )
         {
             p_box = p_box->p_first;
             for( ; ; )
index c319946793613ac1e97ee3de2d3842cea7520d10..394a80bbf8c144e82dbd33612f9f084f5285f8c0 100644 (file)
@@ -1855,7 +1855,7 @@ static int ParsePSB( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
 
 static int64_t ParseRealTime( char *psz, int *h, int *m, int *s, int *f )
 {
-    if( strlen( psz ) == 0 ) return 0;
+    if( *psz == '\0' ) return 0;
     if( sscanf( psz, "%d:%d:%d.%d", h, m, s, f ) == 4 ||
             sscanf( psz, "%d:%d.%d", m, s, f ) == 3 ||
             sscanf( psz, "%d.%d", s, f ) == 2 ||
index f3641edc11b22b2afbfba49e1fdd7f859f8feff4..2c58fab7c0aeeb9933347d13560c6ea67fff6281 100644 (file)
@@ -2166,7 +2166,7 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
         DrawEmptyLine( p_sys->w, 7, 1, COLS-2 );
         if( p_sys->psz_search_chain )
         {
-            if( strlen( p_sys->psz_search_chain ) == 0 &&
+            if( *p_sys->psz_search_chain == '\0' &&
                 p_sys->psz_old_search != NULL )
             {
                 /* Searching next entry */
index 498b1c487d012229d16540cdda16b0b97923d9f0..c7e5a041f1e15faa42078904357a018fc892f857 100644 (file)
@@ -577,7 +577,7 @@ static char *ReadPasswordFile( vlc_object_t *p_this, const char *psz_path )
             *psz_newline = '\0';
     }
 
-    if ( strlen( ps_buffer ) == 0 ) {
+    if ( *ps_buffer == '\0' ) {
         msg_Err( p_this, "No password could be read from '%s'", psz_path );
         goto error;
     }