Commit 143d07a2 authored by Diego Biurrun's avatar Diego Biurrun
Browse files

Mark strings as const where appropriate.

parent 50167f31
......@@ -66,7 +66,7 @@
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static void PrintKey ( dvdcss_t, char *, const uint8_t * );
static void PrintKey ( dvdcss_t, const char *, const uint8_t * );
static int GetBusKey ( dvdcss_t );
static int GetASF ( dvdcss_t );
......@@ -725,7 +725,7 @@ static int GetBusKey( dvdcss_t dvdcss )
/*****************************************************************************
* PrintKey : debug function that dumps a key value
*****************************************************************************/
static void PrintKey( dvdcss_t dvdcss, char *prefix, const uint8_t *data )
static void PrintKey( dvdcss_t dvdcss, const char *prefix, const uint8_t *data )
{
print_debug( dvdcss, "%s%02x:%02x:%02x:%02x:%02x", prefix,
data[0], data[1], data[2], data[3], data[4] );
......
......@@ -185,7 +185,7 @@ void dvdcss_check_device ( dvdcss_t dvdcss )
int i;
#else
char *ppsz_devices[] = { "/dev/dvd", "/dev/cdrom", "/dev/hdc", NULL };
const char *ppsz_devices[] = { "/dev/dvd", "/dev/cdrom", "/dev/hdc", NULL };
int i, i_fd;
#endif
......
......@@ -72,7 +72,7 @@ typedef struct dvdcss_s* dvdcss_t;
/*
* Exported prototypes.
*/
LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target );
LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target );
LIBDVDCSS_EXPORT int dvdcss_close ( dvdcss_t );
LIBDVDCSS_EXPORT int dvdcss_seek ( dvdcss_t,
int i_blocks,
......
......@@ -148,16 +148,16 @@
* calls. \e libdvdcss checks whether ioctls can be performed on the disc,
* and when possible, the disc key is retrieved.
*/
LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( const char *psz_target )
{
char psz_buffer[PATH_MAX];
int i_ret;
char *psz_method = getenv( "DVDCSS_METHOD" );
char *psz_verbose = getenv( "DVDCSS_VERBOSE" );
char *psz_cache = getenv( "DVDCSS_CACHE" );
const char *psz_method = getenv( "DVDCSS_METHOD" );
const char *psz_verbose = getenv( "DVDCSS_VERBOSE" );
const char *psz_cache = getenv( "DVDCSS_CACHE" );
#ifdef DVDCSS_RAW_OPEN
char *psz_raw_device = getenv( "DVDCSS_RAW_DEVICE" );
const char *psz_raw_device = getenv( "DVDCSS_RAW_DEVICE" );
#endif
dvdcss_t dvdcss;
......@@ -268,7 +268,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
#ifdef __OS2__
if( *psz_home == '/' || *psz_home == '\\')
{
char *psz_unixroot = getenv("UNIXROOT");
const char *psz_unixroot = getenv("UNIXROOT");
if( psz_unixroot &&
psz_unixroot[0] &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment