]> git.sesse.net Git - vlc/blobdiff - src/osd/osd_parser.c
The current libvlc-control ABI is not compatible with the 0.8.6 one. Change SONAME.
[vlc] / src / osd / osd_parser.c
index b4d1cf635666639a1793e18da3348966db7afe01..848cfb5708528a57ed58a4071d16d401b0222301 100644 (file)
@@ -24,8 +24,6 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>
-#include <string.h>
 
 #include <vlc/vlc.h>
 #include <vlc_vout.h>
@@ -342,13 +340,11 @@ int osd_ConfigLoader( vlc_object_t *p_this, const char *psz_file,
         size_t i_len = 0;
         long pos = 0;
 
+        result = fscanf(fd, "%24s %255s", &action[0], &path[0] );
+
         /* override images path ? */
         psz_path = config_GetPsz( p_this, "osdmenu-file-path" );
-        if( psz_path == NULL )
-        {
-            result = fscanf(fd, "%24s %255s", &action[0], &path[0] );
-        }
-        else
+        if( psz_path )
         {
             /* psz_path is not null and therefor &path[0] cannot be NULL
              * it might be null terminated.
@@ -679,8 +675,9 @@ int osd_ConfigLoader( vlc_object_t *p_this, const char *psz_file,
                 ( strncmp( ppsz_button_states[1], &state[0], strlen(ppsz_button_states[1]) ) != 0 ) &&
                 ( strncmp( ppsz_button_states[2], &state[0], strlen(ppsz_button_states[2]) ) != 0 ) )
             {
-                msg_Err( p_this, "invalid button state %s for button %s expected %d: unselect, select or pressed)",
-                                    &state[0], &action[0], strlen(&state[0]));
+                msg_Err( p_this, "invalid button state %s for button %s "
+                         "expected %u: unselect, select or pressed)",
+                         &state[0], &action[0], (unsigned)strlen(&state[0]));
                 goto error;
             }