[libdvdcss-devel] Mark struct iovec used in *_readv as const.

Diego Biurrun git at videolan.org
Thu Nov 13 14:56:18 CET 2014


libdvdcss | branch: master | Diego Biurrun <diego at biurrun.de> | Fri Nov  7 18:20:29 2014 +0100| [90a9da373db4ac33cf45acf1db92f427a3111e7d] | committer: Diego Biurrun

Mark struct iovec used in *_readv as const.

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

 src/device.c    |   10 ++++++----
 src/libdvdcss.h |    2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/device.c b/src/device.c
index fd53ea6..5030984 100644
--- a/src/device.c
+++ b/src/device.c
@@ -80,13 +80,13 @@
 static int libc_open  ( dvdcss_t, const char * );
 static int libc_seek  ( dvdcss_t, int );
 static int libc_read  ( dvdcss_t, void *, int );
-static int libc_readv ( dvdcss_t, struct iovec *, int );
+static int libc_readv ( dvdcss_t, const struct iovec *, int );
 
 #ifdef WIN32
 static int win2k_open  ( dvdcss_t, const char * );
 static int win2k_seek  ( dvdcss_t, int );
 static int win2k_read  ( dvdcss_t, void *, int );
-static int win2k_readv ( dvdcss_t, struct iovec *, int );
+static int win2k_readv ( dvdcss_t, const struct iovec *, int );
 
 #elif defined( __OS2__ )
 static int os2_open ( dvdcss_t, const char * );
@@ -652,7 +652,8 @@ static int win2k_read ( dvdcss_t dvdcss, void *p_buffer, int i_blocks )
 /*****************************************************************************
  * Readv commands.
  *****************************************************************************/
-static int libc_readv ( dvdcss_t dvdcss, struct iovec *p_iovec, int i_blocks )
+static int libc_readv ( dvdcss_t dvdcss, const struct iovec *p_iovec,
+                        int i_blocks )
 {
 #if defined( WIN32 )
     int i_index, i_len, i_total = 0;
@@ -725,7 +726,8 @@ static int libc_readv ( dvdcss_t dvdcss, struct iovec *p_iovec, int i_blocks )
 /*****************************************************************************
  * win2k_readv: vectored read using ReadFile for Win2K
  *****************************************************************************/
-static int win2k_readv ( dvdcss_t dvdcss, struct iovec *p_iovec, int i_blocks )
+static int win2k_readv ( dvdcss_t dvdcss, const struct iovec *p_iovec,
+                         int i_blocks )
 {
     int i_index;
     int i_blocks_read, i_blocks_total = 0;
diff --git a/src/libdvdcss.h b/src/libdvdcss.h
index 9750c37..2d5400e 100644
--- a/src/libdvdcss.h
+++ b/src/libdvdcss.h
@@ -56,7 +56,7 @@ struct dvdcss_s
     /* File handling */
     int ( * pf_seek )  ( dvdcss_t, int );
     int ( * pf_read )  ( dvdcss_t, void *, int );
-    int ( * pf_readv ) ( dvdcss_t, struct iovec *, int );
+    int ( * pf_readv ) ( dvdcss_t, const struct iovec *, int );
 
     /* Decryption stuff */
     enum dvdcss_method i_method;



More information about the libdvdcss-devel mailing list