[vlc-commits] vlc_md5.h: Fix inclusion in c++

Richard Diamond git at videolan.org
Wed Jun 29 16:18:35 CEST 2016


vlc | branch: master | Richard Diamond <wichard at vitalitystudios.com> | Thu Mar 24 21:09:25 2016 -0500| [a919ac4474b70d9a44fe02669370f6a52eeb26fc] | committer: Jean-Baptiste Kempf

vlc_md5.h: Fix inclusion in c++

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a919ac4474b70d9a44fe02669370f6a52eeb26fc
---

 include/vlc_md5.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/vlc_md5.h b/include/vlc_md5.h
index 0d61b39..e72ff2f 100644
--- a/include/vlc_md5.h
+++ b/include/vlc_md5.h
@@ -47,11 +47,11 @@ VLC_API void EndMD5( struct md5_s * );
  */
 static inline char * psz_md5_hash( struct md5_s *md5_s )
 {
-    char *psz = malloc( 33 ); /* md5 string is 32 bytes + NULL character */
+    char *psz = (char*)malloc( 33 ); /* md5 string is 32 bytes + NULL character */
     if( likely(psz) )
     {
         for( int i = 0; i < 16; i++ )
-            sprintf( &psz[2*i], "%02"PRIx8, md5_s->buf[i] );
+            sprintf( &psz[2*i], "%02" PRIx8, md5_s->buf[i] );
     }
     return psz;
 }



More information about the vlc-commits mailing list