[vlc-devel] commit: Use NULL instead of 0 for pointers. ( Rémi Duraffort )
git version control
git at videolan.org
Mon Oct 6 21:28:47 CEST 2008
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Oct 6 21:10:04 2008 +0200| [e58e4ccd88ab13bd35493abecdcc89ec259cd7ae] | committer: Rémi Duraffort
Use NULL instead of 0 for pointers.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e58e4ccd88ab13bd35493abecdcc89ec259cd7ae
---
modules/access/rtsp/access.c | 8 ++++----
modules/access/smb.c | 8 ++++----
modules/codec/dvbsub.c | 2 +-
modules/demux/playlist/dvb.c | 10 +++++-----
modules/misc/rtsp.c | 6 +++---
5 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/modules/access/rtsp/access.c b/modules/access/rtsp/access.c
index a1492a6..722b9d3 100644
--- a/modules/access/rtsp/access.c
+++ b/modules/access/rtsp/access.c
@@ -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,
diff --git a/modules/access/smb.c b/modules/access/smb.c
index b5f518b..9b6d4c6 100644
--- a/modules/access/smb.c
+++ b/modules/access/smb.c
@@ -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 )
diff --git a/modules/codec/dvbsub.c b/modules/codec/dvbsub.c
index 9937a6a..d277f4f 100644
--- a/modules/codec/dvbsub.c
+++ b/modules/codec/dvbsub.c
@@ -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;
diff --git a/modules/demux/playlist/dvb.c b/modules/demux/playlist/dvb.c
index 2e00cd0..c2c6dc3 100644
--- a/modules/demux/playlist/dvb.c
+++ b/modules/demux/playlist/dvb.c
@@ -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 )
diff --git a/modules/misc/rtsp.c b/modules/misc/rtsp.c
index 6ad3521..048b864 100644
--- a/modules/misc/rtsp.c
+++ b/modules/misc/rtsp.c
@@ -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;
More information about the vlc-devel
mailing list