# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include "rtsp.h"
static int rtsp_get_status_code( rtsp_client_t *rtsp, const char *psz_string )
{
+ VLC_UNUSED(rtsp);
char psz_buffer[4];
int i_code = 0;
psz_buffer[3] = 0;
i_code = atoi( psz_buffer );
}
- else if( !strncmp( psz_string, "SET_PARAMETER", 8 ) )
+ else if( !strncmp( psz_string, "SET_PARAMETER", sizeof("SET_PARAMETER") - 1 ) )
{
return RTSP_STATUS_SET_PARAMETER;
}
{
char *buf = malloc( strlen(answer) );
sscanf( answer, "%*s %s", buf );
- if( rtsp->p_private->server ) free( rtsp->p_private->server );
+ free( rtsp->p_private->server );
rtsp->p_private->server = buf;
}
if( !strncasecmp( answer, "Session:", 8 ) )
rtsp->pf_disconnect( rtsp->p_userdata );
}
- if( rtsp->p_private->path ) free( rtsp->p_private->path );
- if( rtsp->p_private->host ) free( rtsp->p_private->host );
- if( rtsp->p_private->mrl ) free( rtsp->p_private->mrl );
- if( rtsp->p_private->session ) free( rtsp->p_private->session );
- if( rtsp->p_private->user_agent ) free( rtsp->p_private->user_agent );
- if( rtsp->p_private->server ) free( rtsp->p_private->server );
+ free( rtsp->p_private->path );
+ free( rtsp->p_private->host );
+ free( rtsp->p_private->mrl );
+ free( rtsp->p_private->session );
+ free( rtsp->p_private->user_agent );
+ free( rtsp->p_private->server );
rtsp_free_answers( rtsp );
rtsp_unschedule_all( rtsp );
free( rtsp->p_private );
void rtsp_set_session( rtsp_client_t *rtsp, const char *id )
{
- if( rtsp->p_private->session ) free( rtsp->p_private->session );
+ free( rtsp->p_private->session );
rtsp->p_private->session = strdup(id);
}
{
if( !strncmp(*ptr, string, strlen(string)) ) break;
}
- if( *ptr ) free( *ptr );
+ free( *ptr );
ptr++;
do
{