Commit e58e4ccd authored by Rémi Duraffort's avatar Rémi Duraffort

Use NULL instead of 0 for pointers.

parent 7d7a42b8
......@@ -179,7 +179,7 @@ static int Open( vlc_object_t *p_this )
p_access->p_sys = p_sys = malloc( sizeof( access_sys_t ) );
p_sys->p_rtsp = malloc( sizeof( rtsp_client_t) );
p_sys->p_header = 0;
p_sys->p_header = NULL;
p_sys->p_rtsp->p_userdata = p_access;
p_sys->p_rtsp->pf_connect = RtspConnect;
p_sys->p_rtsp->pf_disconnect = RtspDisconnect;
......@@ -192,7 +192,7 @@ static int Open( vlc_object_t *p_this )
{
msg_Dbg( p_access, "could not connect to: %s", p_access->psz_path );
free( p_sys->p_rtsp );
p_sys->p_rtsp = 0;
p_sys->p_rtsp = NULL;
goto error;
}
......@@ -284,12 +284,12 @@ static block_t *BlockRead( access_t *p_access )
if( p_sys->p_header )
{
p_block = p_sys->p_header;
p_sys->p_header = 0;
p_sys->p_header = NULL;
return p_block;
}
i_size = real_get_rdt_chunk_header( p_access->p_sys->p_rtsp, &pheader );
if( i_size <= 0 ) return 0;
if( i_size <= 0 ) return NULL;
p_block = block_New( p_access, i_size );
p_block->i_buffer = real_get_rdt_chunk( p_access->p_sys->p_rtsp, &pheader,
......
......@@ -129,7 +129,7 @@ static int Open( vlc_object_t *p_this )
access_sys_t *p_sys;
struct stat filestat;
char *psz_path, *psz_uri;
char *psz_user = 0, *psz_pwd = 0, *psz_domain = 0;
char *psz_user = NULL, *psz_pwd = NULL, *psz_domain = NULL;
int i_ret;
#ifdef USE_CTX
......@@ -189,11 +189,11 @@ static int Open( vlc_object_t *p_this )
* smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]] */
if( !psz_user ) psz_user = var_CreateGetString( p_access, "smb-user" );
if( psz_user && !*psz_user ) { free( psz_user ); psz_user = 0; }
if( psz_user && !*psz_user ) { free( psz_user ); psz_user = NULL; }
if( !psz_pwd ) psz_pwd = var_CreateGetString( p_access, "smb-pwd" );
if( psz_pwd && !*psz_pwd ) { free( psz_pwd ); psz_pwd = 0; }
if( psz_pwd && !*psz_pwd ) { free( psz_pwd ); psz_pwd = NULL; }
if( !psz_domain ) psz_domain = var_CreateGetString( p_access, "smb-domain" );
if( psz_domain && !*psz_domain ) { free( psz_domain ); psz_domain = 0; }
if( psz_domain && !*psz_domain ) { free( psz_domain ); psz_domain = NULL; }
#ifdef WIN32
if( psz_user )
......
......@@ -932,7 +932,7 @@ static void decode_region_composition( decoder_t *p_dec, bs_t *s )
p_obj->i_x = bs_read( s, 12 );
bs_skip( s, 4 ); /* Reserved */
p_obj->i_y = bs_read( s, 12 );
p_obj->psz_text = 0;
p_obj->psz_text = NULL;
i_processed_length += 6;
......
......@@ -193,13 +193,13 @@ static const struct
static int ParseLine( char *psz_line, char **ppsz_name,
char ***pppsz_options, int *pi_options )
{
char *psz_name = 0, *psz_parse = psz_line;
char *psz_name = NULL, *psz_parse = psz_line;
int i_count = 0, i_program = 0, i_frequency = 0;
bool b_valid = false;
if( pppsz_options ) *pppsz_options = 0;
if( pppsz_options ) *pppsz_options = NULL;
if( pi_options ) *pi_options = 0;
if( ppsz_name ) *ppsz_name = 0;
if( ppsz_name ) *ppsz_name = NULL;
/* Skip leading tabs and spaces */
while( *psz_parse == ' ' || *psz_parse == '\t' ||
......@@ -210,7 +210,7 @@ static int ParseLine( char *psz_line, char **ppsz_name,
while( psz_parse )
{
const char *psz_option = 0;
const char *psz_option = NULL;
char *psz_end = strchr( psz_parse, ':' );
if( psz_end ) { *psz_end = 0; psz_end++; }
......@@ -281,7 +281,7 @@ static int ParseLine( char *psz_line, char **ppsz_name,
/* This isn't a valid channels file, cleanup everything */
while( (*pi_options)-- ) free( (*pppsz_options)[*pi_options] );
free( *pppsz_options );
*pppsz_options = 0; *pi_options = 0;
*pppsz_options = NULL; *pi_options = 0;
}
if( i_program && pppsz_options && pi_options )
......
......@@ -260,8 +260,8 @@ static void sprintf_hexa( char *s, uint8_t *p_data, int i_data )
static int Open( vlc_object_t *p_this )
{
vod_t *p_vod = (vod_t *)p_this;
vod_sys_t *p_sys = 0;
char *psz_url = 0;
vod_sys_t *p_sys = NULL;
char *psz_url = NULL;
vlc_url_t url;
psz_url = config_GetPsz( p_vod, "rtsp-host" );
......@@ -378,7 +378,7 @@ static vod_media_t *MediaNew( vod_t *p_vod, const char *psz_name,
memset( p_media, 0, sizeof(vod_media_t) );
p_media->id = p_sys->i_media_id++;
TAB_INIT( p_media->i_es, p_media->es );
p_media->psz_mux = 0;
p_media->psz_mux = NULL;
TAB_INIT( p_media->i_rtsp, p_media->rtsp );
p_media->b_raw = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment