]> git.sesse.net Git - vlc/blobdiff - src/config/intf.c
Fix compiler warning about asprintf return value.
[vlc] / src / config / intf.c
index 5f29460a88b3546cc46ed662c7765dc793a2ecc5..a97ef24e3ae98ef1260e23fc4c77fdfeb1a09ac1 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#include <vlc/vlc.h>
-#include "../libvlc.h"
-#include "vlc_keys.h"
-#include "vlc_charset.h"
-
-#include <errno.h>                                                  /* errno */
-
-#ifdef HAVE_LIMITS_H
-#   include <limits.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#    include <unistd.h>                                          /* getuid() */
-#endif
-
-#ifdef HAVE_GETOPT_LONG
-#   ifdef HAVE_GETOPT_H
-#       include <getopt.h>                                       /* getopt() */
-#   endif
-#else
-#   include "../extras/getopt.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
 #endif
 
-#if defined(HAVE_GETPWUID)
-#   include <pwd.h>                                            /* getpwuid() */
-#endif
-
-#if defined( HAVE_SYS_STAT_H )
-#   include <sys/stat.h>
-#endif
-#if defined( HAVE_SYS_TYPES_H )
-#   include <sys/types.h>
-#endif
-#if defined( WIN32 )
-#   if !defined( UNDER_CE )
-#       include <direct.h>
-#   endif
-#include <tchar.h>
-#endif
+#include <vlc_common.h>
 
-#include "configuration.h"
-#include "modules/modules.h"
+#include <assert.h>
 
 /* Adds an extra interface to the configuration */
 void __config_AddIntf( vlc_object_t *p_this, const char *psz_intf )
@@ -165,10 +130,10 @@ void __config_RemoveIntf( vlc_object_t *p_this, const char *psz_intf )
 }
 
 /*
- * Returns VLC_TRUE if the specified extra interface is present in the
- * configuration, VLC_FALSE if not
+ * Returns true if the specified extra interface is present in the
+ * configuration, false if not
  */
-vlc_bool_t __config_ExistIntf( vlc_object_t *p_this, const char *psz_intf )
+bool __config_ExistIntf( vlc_object_t *p_this, const char *psz_intf )
 {
     assert( psz_intf );
 
@@ -181,7 +146,7 @@ vlc_bool_t __config_ExistIntf( vlc_object_t *p_this, const char *psz_intf )
         if( !strncmp( psz_parser, psz_intf, i_len ) )
         {
             free( psz_config );
-            return VLC_TRUE;
+            return true;
         }
         psz_parser = strchr( psz_parser, ':' );
         if( psz_parser ) psz_parser++; /* skip the ':' */
@@ -194,13 +159,13 @@ vlc_bool_t __config_ExistIntf( vlc_object_t *p_this, const char *psz_intf )
         if( !strncmp( psz_parser, psz_intf, i_len ) )
         {
             free( psz_config );
-            return VLC_TRUE;
+            return true;
         }
         psz_parser = strchr( psz_parser, ':' );
         if( psz_parser ) psz_parser++; /* skip the ':' */
     }
     free( psz_config );
 
-    return VLC_FALSE;
+    return false;
 }