[vlc-devel] commit: libxml: return NULL for pointers (not 0). ( Rémi Duraffort )
git version control
git at videolan.org
Wed Nov 11 10:58:17 CET 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Nov 10 23:39:17 2009 +0100| [1317456752f47d8ba9a16c5e4880e049c7467892] | committer: Rémi Duraffort
libxml: return NULL for pointers (not 0).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1317456752f47d8ba9a16c5e4880e049c7467892
---
modules/misc/xml/libxml.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/modules/misc/xml/libxml.c b/modules/misc/xml/libxml.c
index 89dc22b..71f26e6 100644
--- a/modules/misc/xml/libxml.c
+++ b/modules/misc/xml/libxml.c
@@ -246,8 +246,7 @@ static char *ReaderName( xml_reader_t *p_reader )
const xmlChar *psz_name =
xmlTextReaderConstName( p_reader->p_sys->p_reader );
- if( psz_name ) return strdup( (const char *)psz_name );
- else return 0;
+ return psz_name ? strdup( (const char *)psz_name ) : NULL;
}
static char *ReaderValue( xml_reader_t *p_reader )
@@ -255,8 +254,7 @@ static char *ReaderValue( xml_reader_t *p_reader )
const xmlChar *psz_value =
xmlTextReaderConstValue( p_reader->p_sys->p_reader );
- if( psz_value ) return strdup( (const char *)psz_value );
- else return 0;
+ return psz_value ? strdup( (const char *)psz_value ) : NULL;
}
static int ReaderNextAttr( xml_reader_t *p_reader )
More information about the vlc-devel
mailing list