[libdvdnav-devel] Add const

Petri Hintukainen git at videolan.org
Wed Sep 9 09:50:05 CEST 2015


libdvdread | branch: master | Petri Hintukainen <phintuka at gmail.com> | Wed Sep  9 10:10:26 2015 +0300| [08d1ca695b55121bb0e7e82e0fa21028196141a5] | committer: Jean-Baptiste Kempf

Add const

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

> http://git.videolan.org/gitweb.cgi/libdvdread.git/?a=commit;h=08d1ca695b55121bb0e7e82e0fa21028196141a5
---

 src/dvd_reader.c      |    6 +++---
 src/dvd_udf.c         |    2 +-
 src/dvdread/dvd_udf.h |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/dvd_reader.c b/src/dvd_reader.c
index 54a33b2..39f5aaf 100644
--- a/src/dvd_reader.c
+++ b/src/dvd_reader.c
@@ -173,7 +173,7 @@ static int initAllCSSKeys( dvd_reader_t *dvd )
   uint32_t start, len;
   int title;
 
-  char *nokeys_str = getenv("DVDREAD_NOKEYS");
+  const char *nokeys_str = getenv("DVDREAD_NOKEYS");
   if(nokeys_str != NULL)
     return 0;
 
@@ -642,7 +642,7 @@ void DVDClose( dvd_reader_t *dvd )
 /**
  * Open an unencrypted file on a DVD image file.
  */
-static dvd_file_t *DVDOpenFileUDF( dvd_reader_t *dvd, char *filename,
+static dvd_file_t *DVDOpenFileUDF( dvd_reader_t *dvd, const char *filename,
                                    int do_cache )
 {
   uint32_t start, len;
@@ -746,7 +746,7 @@ static int findDVDFile( dvd_reader_t *dvd, const char *file, char *filename )
 /**
  * Open an unencrypted file from a DVD directory tree.
  */
-static dvd_file_t *DVDOpenFilePath( dvd_reader_t *dvd, char *filename )
+static dvd_file_t *DVDOpenFilePath( dvd_reader_t *dvd, const char *filename )
 {
   char full_path[ PATH_MAX + 1 ];
   dvd_file_t *dvd_file;
diff --git a/src/dvd_udf.c b/src/dvd_udf.c
index 3ff857b..5eb3d2b 100644
--- a/src/dvd_udf.c
+++ b/src/dvd_udf.c
@@ -794,7 +794,7 @@ static int UDFFindPartition( dvd_reader_t *device, int partnum,
   return part->valid;
 }
 
-uint32_t UDFFindFile( dvd_reader_t *device, char *filename,
+uint32_t UDFFindFile( dvd_reader_t *device, const char *filename,
                       uint32_t *filesize )
 {
   uint8_t LogBlock_base[ DVD_VIDEO_LB_LEN + 2048 ];
diff --git a/src/dvdread/dvd_udf.h b/src/dvdread/dvd_udf.h
index 9156a67..9f449e0 100644
--- a/src/dvdread/dvd_udf.h
+++ b/src/dvdread/dvd_udf.h
@@ -46,7 +46,7 @@ extern "C" {
  * '/VIDEO_TS/VTS_01_1.IFO'.  On success, filesize will be set to the size of
  * the file in bytes.
  */
-uint32_t UDFFindFile( dvd_reader_t *device, char *filename, uint32_t *size );
+uint32_t UDFFindFile( dvd_reader_t *device, const char *filename, uint32_t *size );
 
 int UDFGetVolumeIdentifier(dvd_reader_t *device,
                            char *volid, unsigned int volid_size);



More information about the libdvdnav-devel mailing list