#include "modules/modules.h"
#include "config/configuration.h"
-#include <errno.h> /* ENOMEM */
#include <stdio.h> /* sprintf() */
#include <string.h>
#include <stdlib.h> /* free() */
PRINT_CAPABILITY( CPU_CAPABILITY_SSE, "SSE" );
PRINT_CAPABILITY( CPU_CAPABILITY_SSE2, "SSE2" );
PRINT_CAPABILITY( CPU_CAPABILITY_SSE3, "SSE3" );
- PRINT_CAPABILITY( CPU_CAPABILITY_SSE3, "SSSE3" );
+ PRINT_CAPABILITY( CPU_CAPABILITY_SSSE3, "SSSE3" );
PRINT_CAPABILITY( CPU_CAPABILITY_SSE4_1, "SSE4.1" );
PRINT_CAPABILITY( CPU_CAPABILITY_SSE4_2, "SSE4.2" );
PRINT_CAPABILITY( CPU_CAPABILITY_SSE4A, "SSE4A" );
*/
/* Create volume callback system. (this variable must be created before
all interfaces as they can use it) */
- var_Create( p_libvlc, "volume-change", VLC_VAR_BOOL );
+ var_Create( p_libvlc, "volume-change", VLC_VAR_VOID );
var_Create( p_libvlc, "volume-muted", VLC_VAR_BOOL );
psz_modules = var_CreateGetNonEmptyString( p_libvlc, "extraintf" );
static const char psz_path[] = LOCALEDIR;
#else
char psz_path[1024];
- if (snprintf (psz_path, sizeof (psz_path), "%s" DIR_SEP "%s",
- config_GetDataDirDefault(), "locale")
- >= (int)sizeof (psz_path))
- return -1;
+ char *datadir = config_GetDataDirDefault();
+ int ret;
+ if (unlikely(datadir == NULL))
+ return -1;
+ ret = snprintf (psz_path, sizeof (psz_path), "%s" DIR_SEP "locale",
+ datadir);
+ free (datadir);
+ if (ret >= (int)sizeof (psz_path))
+ return -1;
#endif
if (bindtextdomain (PACKAGE_NAME, psz_path) == NULL)
{