#include <vlc_network.h>
#include <vlc_strings.h>
#include <vlc_charset.h>
+#include <vlc_fs.h>
#include <vlc_gcrypt.h>
#include <vlc_es.h>
#include <vlc_http.h>
+#include <vlc_memory.h>
#define RAOP_PORT 5000
#define RAOP_USER_AGENT "VLC " VERSION
char *psz_newline;
char ps_buffer[256];
- p_file = utf8_fopen( psz_path, "rt" );
+ p_file = vlc_fopen( psz_path, "rt" );
if ( p_file == NULL )
{
msg_Err( p_this, "Unable to open password file '%s': %m", 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;
}
/* Grow in blocks of 4K */
i_realloc_len = (1 + (i_len / 4096)) * 4096;
- p_sys->p_sendbuf = realloc( p_sys->p_sendbuf, i_realloc_len );
+ p_sys->p_sendbuf = realloc_or_free( p_sys->p_sendbuf, i_realloc_len );
if ( p_sys->p_sendbuf == NULL )
goto error;