[vlc-commits] modules: do not use 0 for NULL
Rémi Denis-Courmont
git at videolan.org
Wed May 9 20:07:27 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May 9 20:54:28 2018 +0300| [f67e6764d98a6ae0c5470fd7db078929e9e0f2a0] | committer: Rémi Denis-Courmont
modules: do not use 0 for NULL
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f67e6764d98a6ae0c5470fd7db078929e9e0f2a0
---
src/modules/cache.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/modules/cache.c b/src/modules/cache.c
index 53c577c1a4..ccd9ffccae 100644
--- a/src/modules/cache.c
+++ b/src/modules/cache.c
@@ -374,7 +374,7 @@ vlc_plugin_t *vlc_cache_load(vlc_object_t *p_this, const char *dir,
assert( dir != NULL );
if( asprintf( &psz_filename, "%s"DIR_SEP CACHE_NAME, dir ) == -1 )
- return 0;
+ return NULL;
msg_Dbg( p_this, "loading plugins cache file %s", psz_filename );
@@ -384,7 +384,7 @@ vlc_plugin_t *vlc_cache_load(vlc_object_t *p_this, const char *dir,
vlc_strerror_c(errno));
free(psz_filename);
if (file == NULL)
- return 0;
+ return NULL;
/* Check the file is a plugins cache */
char cachestr[sizeof (CACHE_STRING) - 1];
@@ -394,7 +394,7 @@ vlc_plugin_t *vlc_cache_load(vlc_object_t *p_this, const char *dir,
{
msg_Warn( p_this, "This doesn't look like a valid plugins cache" );
block_Release(file);
- return 0;
+ return NULL;
}
#ifdef DISTRO_VERSION
@@ -406,7 +406,7 @@ vlc_plugin_t *vlc_cache_load(vlc_object_t *p_this, const char *dir,
{
msg_Warn( p_this, "This doesn't look like a valid plugins cache" );
block_Release(file);
- return 0;
+ return NULL;
}
#endif
@@ -419,7 +419,7 @@ vlc_plugin_t *vlc_cache_load(vlc_object_t *p_this, const char *dir,
msg_Warn( p_this, "This doesn't look like a valid plugins cache "
"(corrupted header)" );
block_Release(file);
- return 0;
+ return NULL;
}
/* Check header marker */
@@ -434,7 +434,7 @@ vlc_plugin_t *vlc_cache_load(vlc_object_t *p_this, const char *dir,
msg_Warn( p_this, "This doesn't look like a valid plugins cache "
"(corrupted header)" );
block_Release(file);
- return 0;
+ return NULL;
}
vlc_plugin_t *cache = NULL;
More information about the vlc-commits
mailing list