From bd15feab4a36b9f143289b8d8fd2d995b3f0e262 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Fri, 22 Jun 2007 19:49:30 +0100 Subject: [PATCH] ntdll: Constify some variables. --- dlls/ntdll/cdrom.c | 12 ++++++------ dlls/ntdll/debugbuffer.c | 8 ++++---- dlls/ntdll/directory.c | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c index f288bfe4df8..e245aadcc8a 100644 --- a/dlls/ntdll/cdrom.c +++ b/dlls/ntdll/cdrom.c @@ -1738,7 +1738,7 @@ static NTSTATUS CDROM_GetAddress(int fd, SCSI_ADDRESS* address) * * */ -static NTSTATUS DVD_StartSession(int fd, PDVD_SESSION_ID sid_in, PDVD_SESSION_ID sid_out) +static NTSTATUS DVD_StartSession(int fd, const DVD_SESSION_ID *sid_in, PDVD_SESSION_ID sid_out) { #if defined(linux) NTSTATUS ret = STATUS_NOT_SUPPORTED; @@ -1746,7 +1746,7 @@ static NTSTATUS DVD_StartSession(int fd, PDVD_SESSION_ID sid_in, PDVD_SESSION_ID memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.type = DVD_LU_SEND_AGID; - if (sid_in) auth_info.lsa.agid = *(int*)sid_in; /* ?*/ + if (sid_in) auth_info.lsa.agid = *(const int*)sid_in; /* ?*/ TRACE("fd 0x%08x\n",fd); ret =CDROM_GetStatusCode(ioctl(fd, DVD_AUTH, &auth_info)); @@ -1764,14 +1764,14 @@ static NTSTATUS DVD_StartSession(int fd, PDVD_SESSION_ID sid_in, PDVD_SESSION_ID * * */ -static NTSTATUS DVD_EndSession(int fd, PDVD_SESSION_ID sid) +static NTSTATUS DVD_EndSession(int fd, const DVD_SESSION_ID *sid) { #if defined(linux) dvd_authinfo auth_info; memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.type = DVD_INVALIDATE_AGID; - auth_info.lsa.agid = *(int*)sid; + auth_info.lsa.agid = *(const int*)sid; TRACE("\n"); return CDROM_GetStatusCode(ioctl(fd, DVD_AUTH, &auth_info)); @@ -1787,7 +1787,7 @@ static NTSTATUS DVD_EndSession(int fd, PDVD_SESSION_ID sid) * * */ -static NTSTATUS DVD_SendKey(int fd, PDVD_COPY_PROTECT_KEY key) +static NTSTATUS DVD_SendKey(int fd, const DVD_COPY_PROTECT_KEY *key) { #if defined(linux) NTSTATUS ret = STATUS_NOT_SUPPORTED; @@ -1931,7 +1931,7 @@ static NTSTATUS DVD_GetRegion(int dev, PDVD_REGION region) * * */ -static NTSTATUS DVD_ReadStructure(int dev, PDVD_READ_STRUCTURE structure, PDVD_LAYER_DESCRIPTOR layer) +static NTSTATUS DVD_ReadStructure(int dev, const DVD_READ_STRUCTURE *structure, PDVD_LAYER_DESCRIPTOR layer) { #ifdef DVD_READ_STRUCT dvd_struct s; diff --git a/dlls/ntdll/debugbuffer.c b/dlls/ntdll/debugbuffer.c index e9625974975..be1ddffc1da 100644 --- a/dlls/ntdll/debugbuffer.c +++ b/dlls/ntdll/debugbuffer.c @@ -35,7 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(debug_buffer); -static void dump_DEBUG_MODULE_INFORMATION(PDEBUG_MODULE_INFORMATION iBuf) +static void dump_DEBUG_MODULE_INFORMATION(const DEBUG_MODULE_INFORMATION *iBuf) { TRACE( "MODULE_INFORMATION:%p\n", iBuf ); if (NULL == iBuf) return ; @@ -44,7 +44,7 @@ static void dump_DEBUG_MODULE_INFORMATION(PDEBUG_MODULE_INFORMATION iBuf) TRACE( "Flags:%d\n", iBuf->Flags ); } -static void dump_DEBUG_HEAP_INFORMATION(PDEBUG_HEAP_INFORMATION iBuf) +static void dump_DEBUG_HEAP_INFORMATION(const DEBUG_HEAP_INFORMATION *iBuf) { TRACE( "HEAP_INFORMATION:%p\n", iBuf ); if (NULL == iBuf) return ; @@ -52,7 +52,7 @@ static void dump_DEBUG_HEAP_INFORMATION(PDEBUG_HEAP_INFORMATION iBuf) TRACE( "Flags:%d\n", iBuf->Flags ); } -static void dump_DEBUG_LOCK_INFORMATION(PDEBUG_LOCK_INFORMATION iBuf) +static void dump_DEBUG_LOCK_INFORMATION(const DEBUG_LOCK_INFORMATION *iBuf) { TRACE( "LOCK_INFORMATION:%p\n", iBuf ); @@ -70,7 +70,7 @@ static void dump_DEBUG_LOCK_INFORMATION(PDEBUG_LOCK_INFORMATION iBuf) TRACE( "NumberOfExclusiveWaiters:%d\n", iBuf->NumberOfExclusiveWaiters ); } -static void dump_DEBUG_BUFFER(PDEBUG_BUFFER iBuf) +static void dump_DEBUG_BUFFER(const DEBUG_BUFFER *iBuf) { if (NULL == iBuf) return ; TRACE( "SectionHandle:%p\n", iBuf->SectionHandle); diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 5eac7f383f1..99754556118 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -161,7 +161,7 @@ static inline BOOL is_invalid_dos_char( WCHAR ch ) } /* check if the device can be a mounted volume */ -static inline int is_valid_mounted_device( struct stat *st ) +static inline int is_valid_mounted_device( const struct stat *st ) { #if defined(linux) || defined(__sun__) return S_ISBLK( st->st_mode );