[libdvdcss-devel] Eliminate some pointless void* casts

[email protected] (Diego Biurrun)
Newsgroups gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel
Message-ID <[email protected]>
libdvdcss | branch: master | Diego Biurrun <[email protected]> | Mon Oct 20 11:59:12 2014 +0200| [fde3c32f399a0b4b98a68eb9e95b8eaed76732dd] | committer: Diego Biurrun

Eliminate some pointless void* casts

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

 src/device.c    |    2 +-
 src/libdvdcss.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/device.c b/src/device.c
index 2f4ae1d..d101b1c 100644
--- a/src/device.c
+++ b/src/device.c
@@ -635,7 +635,7 @@ static int aspi_open( dvdcss_t dvdcss, char const * psz_device )
                 }
                 else
                 {
-                    free( (void*) fd );
+                    free( fd );
                     FreeLibrary( hASPI );
                     print_error( dvdcss,"this is not a CD-ROM drive" );
                     return -1;
diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index daa28bb..22a0053 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -632,7 +632,7 @@ LIBDVDCSS_EXPORT int dvdcss_read ( dvdcss_t dvdcss, void *p_buffer,
                 /* or fail completely? return 0; */
                 break;
             }
-            p_buffer = (void *) ((uint8_t *)p_buffer + DVDCSS_BLOCK_SIZE);
+            p_buffer = (uint8_t *)p_buffer + DVDCSS_BLOCK_SIZE;
         }
     }
     else
@@ -642,7 +642,7 @@ LIBDVDCSS_EXPORT int dvdcss_read ( dvdcss_t dvdcss, void *p_buffer,
         {
             _dvdcss_unscramble( dvdcss->css.p_title_key, p_buffer );
             ((uint8_t*)p_buffer)[0x14] &= 0x8f;
-            p_buffer = (void *) ((uint8_t *)p_buffer + DVDCSS_BLOCK_SIZE);
+            p_buffer = (uint8_t *)p_buffer + DVDCSS_BLOCK_SIZE;
         }
     }
 

_______________________________________________
libdvdcss-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libdvdcss-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.