Commit 48f3bacb authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

ntdll: Avoid double initialization.

parent 2841e180
...@@ -748,8 +748,8 @@ static NTSTATUS CDROM_GetDeviceNumber(int dev, STORAGE_DEVICE_NUMBER* devnum) ...@@ -748,8 +748,8 @@ static NTSTATUS CDROM_GetDeviceNumber(int dev, STORAGE_DEVICE_NUMBER* devnum)
static NTSTATUS CDROM_GetDriveGeometry(int dev, int fd, DISK_GEOMETRY* dg) static NTSTATUS CDROM_GetDriveGeometry(int dev, int fd, DISK_GEOMETRY* dg)
{ {
CDROM_TOC toc; CDROM_TOC toc;
NTSTATUS ret = 0; NTSTATUS ret;
int fsize = 0; int fsize;
if ((ret = CDROM_ReadTOC(dev, fd, &toc)) != 0) return ret; if ((ret = CDROM_ReadTOC(dev, fd, &toc)) != 0) return ret;
...@@ -2432,7 +2432,7 @@ static NTSTATUS DVD_ReadKey(int fd, PDVD_COPY_PROTECT_KEY key) ...@@ -2432,7 +2432,7 @@ static NTSTATUS DVD_ReadKey(int fd, PDVD_COPY_PROTECT_KEY key)
static NTSTATUS DVD_GetRegion(int fd, PDVD_REGION region) static NTSTATUS DVD_GetRegion(int fd, PDVD_REGION region)
{ {
#if defined(linux) #if defined(linux)
NTSTATUS ret = STATUS_NOT_SUPPORTED; NTSTATUS ret;
dvd_struct dvd; dvd_struct dvd;
dvd_authinfo auth_info; dvd_authinfo auth_info;
...@@ -2460,7 +2460,7 @@ static NTSTATUS DVD_GetRegion(int fd, PDVD_REGION region) ...@@ -2460,7 +2460,7 @@ static NTSTATUS DVD_GetRegion(int fd, PDVD_REGION region)
dk_dvd_read_structure_t dvd; dk_dvd_read_structure_t dvd;
DVDRegionPlaybackControlInfo rpc; DVDRegionPlaybackControlInfo rpc;
DVDCopyrightInfo copy; DVDCopyrightInfo copy;
NTSTATUS ret = STATUS_NOT_SUPPORTED; NTSTATUS ret;
key.format = kDVDKeyFormatRegionState; key.format = kDVDKeyFormatRegionState;
key.keyClass = kDVDKeyClassCSS_CPPM_CPRM; key.keyClass = kDVDKeyClassCSS_CPPM_CPRM;
...@@ -2636,7 +2636,7 @@ static NTSTATUS DVD_ReadStructure(int dev, const DVD_READ_STRUCTURE *structure, ...@@ -2636,7 +2636,7 @@ static NTSTATUS DVD_ReadStructure(int dev, const DVD_READ_STRUCTURE *structure,
break; break;
} }
#elif defined(__APPLE__) #elif defined(__APPLE__)
NTSTATUS ret = STATUS_NOT_SUPPORTED; NTSTATUS ret;
dk_dvd_read_structure_t dvdrs; dk_dvd_read_structure_t dvdrs;
union union
{ {
...@@ -2771,7 +2771,7 @@ static NTSTATUS DVD_ReadStructure(int dev, const DVD_READ_STRUCTURE *structure, ...@@ -2771,7 +2771,7 @@ static NTSTATUS DVD_ReadStructure(int dev, const DVD_READ_STRUCTURE *structure,
static NTSTATUS GetInquiryData(int fd, PSCSI_ADAPTER_BUS_INFO BufferOut, DWORD OutBufferSize) static NTSTATUS GetInquiryData(int fd, PSCSI_ADAPTER_BUS_INFO BufferOut, DWORD OutBufferSize)
{ {
#ifdef HAVE_SG_IO_HDR_T_INTERFACE_ID #ifdef HAVE_SG_IO_HDR_T_INTERFACE_ID
PSCSI_INQUIRY_DATA pInquiryData = NULL; PSCSI_INQUIRY_DATA pInquiryData;
UCHAR sense_buffer[32]; UCHAR sense_buffer[32];
int iochk, version; int iochk, version;
sg_io_hdr_t iocmd; sg_io_hdr_t iocmd;
......
...@@ -91,7 +91,7 @@ static void dump_DEBUG_BUFFER(const DEBUG_BUFFER *iBuf) ...@@ -91,7 +91,7 @@ static void dump_DEBUG_BUFFER(const DEBUG_BUFFER *iBuf)
PDEBUG_BUFFER WINAPI RtlCreateQueryDebugBuffer(IN ULONG iSize, IN BOOLEAN iEventPair) PDEBUG_BUFFER WINAPI RtlCreateQueryDebugBuffer(IN ULONG iSize, IN BOOLEAN iEventPair)
{ {
PDEBUG_BUFFER oBuf = NULL; PDEBUG_BUFFER oBuf;
FIXME("(%d, %d): stub\n", iSize, iEventPair); FIXME("(%d, %d): stub\n", iSize, iEventPair);
if (iSize < sizeof(DEBUG_BUFFER)) { if (iSize < sizeof(DEBUG_BUFFER)) {
iSize = sizeof(DEBUG_BUFFER); iSize = sizeof(DEBUG_BUFFER);
......
...@@ -993,7 +993,7 @@ static void add_fs_cache( dev_t dev, fsid_t fsid, BOOLEAN case_sensitive ) ...@@ -993,7 +993,7 @@ static void add_fs_cache( dev_t dev, fsid_t fsid, BOOLEAN case_sensitive )
*/ */
static int get_dir_case_sensitivity_attr( const char *dir ) static int get_dir_case_sensitivity_attr( const char *dir )
{ {
char *mntpoint = NULL; char *mntpoint;
struct attrlist attr; struct attrlist attr;
struct vol_caps caps; struct vol_caps caps;
struct get_fsid get_fsid; struct get_fsid get_fsid;
......
...@@ -1865,7 +1865,7 @@ static NTSTATUS load_builtin_dll( LPCWSTR load_path, LPCWSTR path, HANDLE file, ...@@ -1865,7 +1865,7 @@ static NTSTATUS load_builtin_dll( LPCWSTR load_path, LPCWSTR path, HANDLE file,
char error[256], dllname[MAX_PATH]; char error[256], dllname[MAX_PATH];
const WCHAR *name, *p; const WCHAR *name, *p;
DWORD len, i; DWORD len, i;
void *handle = NULL; void *handle;
struct builtin_load_info info, *prev_info; struct builtin_load_info info, *prev_info;
/* Fix the name in case we have a full path and extension */ /* Fix the name in case we have a full path and extension */
......
...@@ -532,7 +532,7 @@ NTSTATUS WINAPI NtQueryValueKey( HANDLE handle, const UNICODE_STRING *name, ...@@ -532,7 +532,7 @@ NTSTATUS WINAPI NtQueryValueKey( HANDLE handle, const UNICODE_STRING *name,
{ {
NTSTATUS ret; NTSTATUS ret;
UCHAR *data_ptr; UCHAR *data_ptr;
unsigned int fixed_size = 0, min_size = 0; unsigned int fixed_size, min_size;
TRACE( "(%p,%s,%d,%p,%d)\n", handle, debugstr_us(name), info_class, info, length ); TRACE( "(%p,%s,%d,%p,%d)\n", handle, debugstr_us(name), info_class, info, length );
......
...@@ -463,7 +463,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, const SECURITY_DESCRIPTOR * ...@@ -463,7 +463,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, const SECURITY_DESCRIPTOR *
pthread_t pthread_id; pthread_t pthread_id;
pthread_attr_t attr; pthread_attr_t attr;
struct ntdll_thread_data *thread_data; struct ntdll_thread_data *thread_data;
struct startup_info *info = NULL; struct startup_info *info;
HANDLE handle = 0, actctx = 0; HANDLE handle = 0, actctx = 0;
TEB *teb = NULL; TEB *teb = NULL;
DWORD tid = 0; DWORD tid = 0;
...@@ -732,7 +732,7 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context ) ...@@ -732,7 +732,7 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context )
{ {
NTSTATUS ret; NTSTATUS ret;
DWORD dummy, i; DWORD dummy, i;
BOOL self = FALSE; BOOL self;
#ifdef __i386__ #ifdef __i386__
/* on i386 debug registers always require a server call */ /* on i386 debug registers always require a server call */
...@@ -746,6 +746,8 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context ) ...@@ -746,6 +746,8 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context )
ntdll_get_thread_data()->dr6 == context->Dr6 && ntdll_get_thread_data()->dr6 == context->Dr6 &&
ntdll_get_thread_data()->dr7 == context->Dr7); ntdll_get_thread_data()->dr7 == context->Dr7);
} }
#else
self = FALSE;
#endif #endif
if (!self) if (!self)
......
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