[libdvdcss-devel] [PATCH 18/25] device: Drop some unnecessary casts from offset calculations

Diego Biurrun diego at biurrun.de
Mon Oct 20 11:59:11 CEST 2014


---
 src/device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/device.c b/src/device.c
index f78ffc0..871572c 100644
--- a/src/device.c
+++ b/src/device.c
@@ -695,7 +695,7 @@ static int libc_seek( dvdcss_t dvdcss, int i_blocks )
         return i_blocks;
     }
 
-    i_seek = (off_t)i_blocks * (off_t)DVDCSS_BLOCK_SIZE;
+    i_seek = i_blocks * DVDCSS_BLOCK_SIZE;
     i_seek = lseek( dvdcss->i_read_fd, i_seek, SEEK_SET );
 
     if( i_seek < 0 )
@@ -779,7 +779,7 @@ static int libc_read ( dvdcss_t dvdcss, void *p_buffer, int i_blocks )
 {
     off_t i_size, i_ret;
 
-    i_size = (off_t)i_blocks * (off_t)DVDCSS_BLOCK_SIZE;
+    i_size = i_blocks * DVDCSS_BLOCK_SIZE;
     i_ret = read( dvdcss->i_read_fd, p_buffer, i_size );
 
     if( i_ret < 0 )
-- 
1.9.1



More information about the libdvdcss-devel mailing list