Author: tkreuzer Date: Tue Sep 20 17:33:51 2011 New Revision: 53776
URL: http://svn.reactos.org/svn/reactos?rev=53776&view=rev Log: [RTL] - Remove qsort, its already in crt. - Fix a number of MSVC/64 bit issues
Removed: trunk/reactos/lib/rtl/qsort.c Modified: trunk/reactos/lib/rtl/CMakeLists.txt trunk/reactos/lib/rtl/acl.c trunk/reactos/lib/rtl/bitmap.c trunk/reactos/lib/rtl/critical.c trunk/reactos/lib/rtl/dbgbuffer.c trunk/reactos/lib/rtl/debug.c trunk/reactos/lib/rtl/dos8dot3.c trunk/reactos/lib/rtl/env.c trunk/reactos/lib/rtl/path.c trunk/reactos/lib/rtl/rtl.rbuild trunk/reactos/lib/rtl/sd.c trunk/reactos/lib/rtl/sid.c
Modified: trunk/reactos/lib/rtl/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/CMakeLists.txt?rev=... ============================================================================== --- trunk/reactos/lib/rtl/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/CMakeLists.txt [iso-8859-1] Tue Sep 20 17:33:51 2011 @@ -42,7 +42,6 @@ ppb.c process.c propvar.c - qsort.c random.c rangelist.c registry.c
Modified: trunk/reactos/lib/rtl/acl.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/acl.c?rev=53776&... ============================================================================== --- trunk/reactos/lib/rtl/acl.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/acl.c [iso-8859-1] Tue Sep 20 17:33:51 2011 @@ -461,7 +461,7 @@ { PACE Ace; PACE Current; - ULONG NewAceCount; + WORD NewAceCount; ULONG Index; PAGED_CODE_RTL();
@@ -515,7 +515,7 @@ (ULONG)((ULONG_PTR)Ace - (ULONG_PTR)Current));
Acl->AceCount = Acl->AceCount + NewAceCount; - Acl->AclRevision = AclRevision; + Acl->AclRevision = (BYTE)AclRevision;
return STATUS_SUCCESS; } @@ -737,8 +737,8 @@ }
AclSize = ROUND_UP(AclSize, 4); - Acl->AclSize = AclSize; - Acl->AclRevision = AclRevision; + Acl->AclSize = (WORD)AclSize; + Acl->AclRevision = (BYTE)AclRevision; Acl->AceCount = 0; Acl->Sbz1 = 0; Acl->Sbz2 = 0; @@ -850,7 +850,7 @@ return STATUS_INVALID_PARAMETER; }
- Acl->AclRevision = Info->AclRevision; + Acl->AclRevision = (BYTE)Info->AclRevision; } break;
Modified: trunk/reactos/lib/rtl/bitmap.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/bitmap.c?rev=53776&... ============================================================================== --- trunk/reactos/lib/rtl/bitmap.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/bitmap.c [iso-8859-1] Tue Sep 20 17:33:51 2011 @@ -81,7 +81,7 @@ BitScanForward(&BitPos, Value);
/* Calculate length up to where we read */ - Length = (Buffer - BitMapHeader->Buffer) * 32 - StartingIndex; + Length = (ULONG)(Buffer - BitMapHeader->Buffer) * 32 - StartingIndex; Length += BitPos - 32;
/* Make sure we don't go past the last bit */ @@ -130,7 +130,7 @@ BitScanForward(&BitPos, InvValue);
/* Calculate length up to where we read */ - Length = (Buffer - BitMapHeader->Buffer) * 32 - StartingIndex; + Length = (ULONG)(Buffer - BitMapHeader->Buffer) * 32 - StartingIndex; Length += BitPos - 32;
/* Make sure we don't go past the last bit */
Modified: trunk/reactos/lib/rtl/critical.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/critical.c?rev=5377... ============================================================================== --- trunk/reactos/lib/rtl/critical.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/critical.c [iso-8859-1] Tue Sep 20 17:33:51 2011 @@ -407,7 +407,7 @@ RtlSetCriticalSectionSpinCount(PRTL_CRITICAL_SECTION CriticalSection, ULONG SpinCount) { - ULONG OldCount = CriticalSection->SpinCount; + ULONG OldCount = (ULONG)CriticalSection->SpinCount;
/* Set to parameter if MP, or to 0 if this is Uniprocessor */ CriticalSection->SpinCount = (NtCurrentPeb()->NumberOfProcessors > 1) ? SpinCount : 0;
Modified: trunk/reactos/lib/rtl/dbgbuffer.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/dbgbuffer.c?rev=537... ============================================================================== --- trunk/reactos/lib/rtl/dbgbuffer.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/dbgbuffer.c [iso-8859-1] Tue Sep 20 17:33:51 2011 @@ -36,7 +36,7 @@ }
Buf->ViewBaseClient = Buf; - Buf->ViewSize = ViewSize; + Buf->ViewSize = (ULONG)ViewSize;
DPRINT("RtlCQDB: BA: %p BS: 0x%lx\n", Buf->ViewBaseClient, Buf->ViewSize);
@@ -203,7 +203,7 @@
p = strrchr(ModulePtr->FullPathName, '\'); if (p != NULL) - ModulePtr->OffsetToFileName = p - ModulePtr->FullPathName + 1; + ModulePtr->OffsetToFileName = (USHORT)(p - ModulePtr->FullPathName + 1); else ModulePtr->OffsetToFileName = 0;
@@ -234,7 +234,7 @@ IN OUT PRTL_DEBUG_INFORMATION Buf) { NTSTATUS Status = STATUS_SUCCESS; - ULONG Pid = (ULONG_PTR) NtCurrentTeb()->ClientId.UniqueProcess; + ULONG Pid = (ULONG)(ULONG_PTR) NtCurrentTeb()->ClientId.UniqueProcess;
Buf->Flags = DebugInfoMask; Buf->OffsetFree = sizeof(RTL_DEBUG_INFORMATION);
Modified: trunk/reactos/lib/rtl/debug.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/debug.c?rev=53776&a... ============================================================================== --- trunk/reactos/lib/rtl/debug.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/debug.c [iso-8859-1] Tue Sep 20 17:33:51 2011 @@ -57,7 +57,7 @@ NTSTATUS Status; STRING DebugString; CHAR Buffer[512]; - ULONG Length, PrefixLength; + SIZE_T Length, PrefixLength; EXCEPTION_RECORD ExceptionRecord;
/* Check if we should print it or not */ @@ -110,7 +110,7 @@ }
/* Build the string */ - DebugString.Length = Length; + DebugString.Length = (USHORT)Length; DebugString.Buffer = Buffer;
/* First, let the debugger know as well */ @@ -281,7 +281,7 @@ Input.Buffer = Response;
/* Setup the output string */ - Output.Length = strlen(Prompt); + Output.Length = (USHORT)strlen(Prompt); Output.Buffer = (PCHAR)Prompt;
/* Call the system service */ @@ -380,9 +380,9 @@
/* Setup the strings */ NameString.Buffer = (PCHAR)Name; - NameString.Length = strlen(Name); + NameString.Length = (USHORT)strlen(Name); CommandString.Buffer = (PCHAR)Command; - CommandString.Length = strlen(Command); + CommandString.Length = (USHORT)strlen(Command);
/* Send them to the debugger */ DebugService2(&NameString, &CommandString, BREAKPOINT_COMMAND_STRING);
Modified: trunk/reactos/lib/rtl/dos8dot3.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/dos8dot3.c?rev=5377... ============================================================================== --- trunk/reactos/lib/rtl/dos8dot3.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/dos8dot3.c [iso-8859-1] Tue Sep 20 17:33:51 2011 @@ -119,7 +119,7 @@ { c = 0; RtlUpcaseUnicodeToOemN(&c, sizeof(CHAR), &Count, &Name->Buffer[i], sizeof(WCHAR)); - if (Count != 1 || c == 0 || RtlpIsShortIllegal(Name->Buffer[i])) + if (Count != 1 || c == 0 || RtlpIsShortIllegal(c)) { ExtBuffer[ExtLength++] = L'_'; } @@ -211,12 +211,12 @@ j += IndexLength + 1;
memcpy(Name8dot3->Buffer + j, ExtBuffer, ExtLength * sizeof(WCHAR)); - Name8dot3->Length = (j + ExtLength) * sizeof(WCHAR); + Name8dot3->Length = (USHORT)(j + ExtLength) * sizeof(WCHAR);
DPRINT("Name8dot3: '%wZ'\n", Name8dot3);
/* Update context */ - Context->NameLength = CopyLength; + Context->NameLength = (UCHAR)CopyLength; Context->ExtensionLength = ExtLength; memcpy(Context->NameBuffer, NameBuffer, CopyLength * sizeof(WCHAR)); memcpy(Context->ExtensionBuffer, ExtBuffer, ExtLength * sizeof(WCHAR));
Modified: trunk/reactos/lib/rtl/env.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/env.c?rev=53776&... ============================================================================== --- trunk/reactos/lib/rtl/env.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/env.c [iso-8859-1] Tue Sep 20 17:33:51 2011 @@ -163,11 +163,11 @@ if (Tail != 0) { Variable.MaximumLength = - Variable.Length = (VariableEnd - (SourceBuffer + 1)) * sizeof(WCHAR); + Variable.Length = (USHORT)(VariableEnd - (SourceBuffer + 1)) * sizeof(WCHAR); Variable.Buffer = SourceBuffer + 1;
Value.Length = 0; - Value.MaximumLength = DestMax * sizeof(WCHAR); + Value.MaximumLength = (USHORT)DestMax * sizeof(WCHAR); Value.Buffer = DestBuffer;
Status = RtlQueryEnvironmentVariable_U(Environment, &Variable, @@ -227,7 +227,7 @@ else ReturnStatus = STATUS_BUFFER_TOO_SMALL;
- Destination->Length = (DestBuffer - Destination->Buffer) * sizeof(WCHAR); + Destination->Length = (USHORT)(DestBuffer - Destination->Buffer) * sizeof(WCHAR); if (Length != NULL) *Length = TotalLength * sizeof(WCHAR);
@@ -271,7 +271,7 @@ { MEMORY_BASIC_INFORMATION mbi; UNICODE_STRING var; - int hole_len, new_len, env_len = 0; + size_t hole_len, new_len, env_len = 0; WCHAR *new_env = 0, *env_end = 0, *wcs, *env, *val = 0, *tail = 0, *hole = 0; PWSTR head = NULL; SIZE_T size = 0, new_size; @@ -328,7 +328,7 @@ } if (*wcs) { - var.Length = (wcs - var.Buffer) * sizeof(WCHAR); + var.Length = (USHORT)(wcs - var.Buffer) * sizeof(WCHAR); var.MaximumLength = var.Length; val = ++wcs; wcs += wcslen(wcs); @@ -532,14 +532,14 @@ } if (*wcs) { - var.Length = var.MaximumLength = (wcs - var.Buffer) * sizeof(WCHAR); + var.Length = var.MaximumLength = (USHORT)(wcs - var.Buffer) * sizeof(WCHAR); val = ++wcs; wcs += wcslen(wcs); DPRINT("Search at :%S\n", wcs);
if (RtlEqualUnicodeString(&var, Name, TRUE)) { - Value->Length = (wcs - val) * sizeof(WCHAR); + Value->Length = (USHORT)(wcs - val) * sizeof(WCHAR); if (Value->Length <= Value->MaximumLength) { memcpy(Value->Buffer, val,
Modified: trunk/reactos/lib/rtl/path.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/path.c?rev=53776&am... ============================================================================== --- trunk/reactos/lib/rtl/path.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/path.c [iso-8859-1] Tue Sep 20 17:33:51 2011 @@ -47,7 +47,7 @@ { UNICODE_STRING DeviceName; PWCHAR Start, End, Ptr; - ULONG DeviceNameLength; + SIZE_T DeviceNameLength;
/* Validate the input */ if (!PathString) return 0; @@ -363,9 +363,9 @@ }
/* Build the final NT path string */ - NtPath->Length = DosLength; + NtPath->Length = (USHORT)DosLength; NtPath->Buffer = NewBuffer; - NtPath->MaximumLength = DosLength + sizeof(UNICODE_NULL); + NtPath->MaximumLength = (USHORT)DosLength + sizeof(UNICODE_NULL); return STATUS_SUCCESS; }
@@ -502,8 +502,8 @@
/* Setup the actual NT path string and terminate it */ NtName->Buffer = NewBuffer; - NtName->Length = Length; - NtName->MaximumLength = MaxLength; + NtName->Length = (USHORT)Length; + NtName->MaximumLength = (USHORT)MaxLength; NewBuffer[LengthChars] = UNICODE_NULL; DPRINT("new buffer: %S\n", NewBuffer); DPRINT("NT Name: %wZ\n", NtName); @@ -550,7 +550,7 @@ { Length = ((cd->DosPath.Length / sizeof(WCHAR)) - PrefixCut) + ((InputPathType == 1) ? 8 : 4); RelativeName->RelativeName.Buffer = NewBuffer + Length; - RelativeName->RelativeName.Length = NtName->Length - (Length * sizeof(WCHAR)); + RelativeName->RelativeName.Length = NtName->Length - (USHORT)(Length * sizeof(WCHAR)); RelativeName->RelativeName.MaximumLength = RelativeName->RelativeName.Length; RelativeName->ContainingDirectory = cd->Handle; } @@ -875,7 +875,7 @@ IO_STATUS_BLOCK iosb; PCURDIR cd; NTSTATUS Status; - ULONG size; + USHORT size; HANDLE handle = NULL; PWSTR ptr;
@@ -1055,7 +1055,7 @@ LPWSTR buffer, ULONG size) { - ULONG reqsize = 0, mark = 0, dep = 0, deplen; + SIZE_T reqsize = 0, mark = 0, dep = 0, deplen; LPWSTR ins_str = NULL; LPCWSTR ptr; const UNICODE_STRING* cd; @@ -1103,7 +1103,7 @@ var.MaximumLength = 4 * sizeof(WCHAR); var.Buffer = tmp; val.Length = 0; - val.MaximumLength = size; + val.MaximumLength = (USHORT)size; val.Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, size); if (val.Buffer == NULL) { @@ -1221,12 +1221,12 @@ if (ins_str != tmp && ins_str != cd->Buffer) RtlFreeHeap(RtlGetProcessHeap(), 0, ins_str);
- collapse_path( buffer, mark ); + collapse_path( buffer, (ULONG)mark ); reqsize = wcslen(buffer) * sizeof(WCHAR);
done: RtlReleasePebLock(); - return reqsize; + return (ULONG)reqsize; }
Removed: trunk/reactos/lib/rtl/qsort.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/qsort.c?rev=53775&a... ============================================================================== --- trunk/reactos/lib/rtl/qsort.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/qsort.c (removed) @@ -1,220 +1,0 @@ -/* - * COPYRIGHT: - *- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * PROJECT: ReactOS system libraries - * PURPOSE: Unicode Conversion Routines - * FILE: lib/rtl/qsort.c - * PROGRAMMER: Adapted from CygWin newlib 2000-03-12. - */ -#include <rtl.h> - -/* FIXME: these types should be from the default includes */ - -typedef int (__cdecl* _pfunccmp_t) (const void *, const void *); - -/* - * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". - */ -#define swapcode(TYPE, parmi, parmj, n) { \ - long i = (n) / sizeof (TYPE); \ - register TYPE *pi = (TYPE *) (parmi); \ - register TYPE *pj = (TYPE *) (parmj); \ - do { \ - register TYPE t = *pi; \ - *pi++ = *pj; \ - *pj++ = t; \ - } while (--i > 0); \ -} - -#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ - es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; - -static __inline void -swapfunc ( - char * a, - char * b, - int n, - int swaptype - ) -{ - if(swaptype <= 1) - swapcode(long, a, b, n) - else - swapcode(char, a, b, n) -} - -#define swap(a, b) \ - if (swaptype == 0) { \ - long t = *(long *)(a); \ - *(long *)(a) = *(long *)(b); \ - *(long *)(b) = t; \ - } else \ - swapfunc(a, b, es, swaptype) - -#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) - -static __inline char * -med3 ( - char * a, - char * b, - char * c, - _pfunccmp_t cmp - ) -{ - return cmp(a, b) < 0 ? - (cmp(b, c) < 0 ? b : (cmp(a, c) < 0 ? c : a )) - :(cmp(b, c) > 0 ? b : (cmp(a, c) < 0 ? a : c )); -} - - -/* EXPORTED */ -void -__cdecl -qsort ( - void * a, - size_t n, - size_t es, - _pfunccmp_t cmp - ) -{ - char *pa, *pb, *pc, *pd, *pl, *pm, *pn; - int d, r, swaptype, swap_cnt; - -loop: SWAPINIT(a, es); - swap_cnt = 0; - if (n < 7) - { - for ( pm = (char *) a + es; - pm < (char *) a + n * es; - pm += es - ) - { - for ( pl = pm; - pl > (char *) a && cmp(pl - es, pl) > 0; - pl -= es - ) - { - swap(pl, pl - es); - } - } - return; - } - pm = (char *) a + (n / 2) * es; - if (n > 7) - { - pl = (char *) a; - pn = (char *) a + (n - 1) * es; - if (n > 40) - { - d = (n / 8) * es; - pl = med3(pl, pl + d, pl + 2 * d, cmp); - pm = med3(pm - d, pm, pm + d, cmp); - pn = med3(pn - 2 * d, pn - d, pn, cmp); - } - pm = med3(pl, pm, pn, cmp); - } - swap(a, pm); - pa = pb = (char *) a + es; - - pc = pd = (char *) a + (n - 1) * es; - for (;;) - { - while (pb <= pc && (r = cmp(pb, a)) <= 0) - { - if (r == 0) - { - swap_cnt = 1; - swap(pa, pb); - pa += es; - } - pb += es; - } - while (pb <= pc && (r = cmp(pc, a)) >= 0) - { - if (r == 0) - { - swap_cnt = 1; - swap(pc, pd); - pd -= es; - } - pc -= es; - } - if (pb > pc) - { - break; - } - swap(pb, pc); - swap_cnt = 1; - pb += es; - pc -= es; - } - if (swap_cnt == 0) /* Switch to insertion sort */ - { - for ( pm = (char *) a + es; - pm < (char *) a + n * es; - pm += es - ) - { - for ( pl = pm; - pl > (char *) a && cmp(pl - es, pl) > 0; - pl -= es - ) - { - swap(pl, pl - es); - } - } - return; - } - - pn = (char *) a + n * es; - r = min(pa - (char *)a, pb - pa); - vecswap(a, pb - r, r); - r = min(pd - pc, pn - pd - es); - vecswap(pb, pn - r, r); - if ((r = pb - pa) > es) - { - qsort(a, r / es, es, cmp); - } - if ((r = pd - pc) > es) - { - /* Iterate rather than recurse to save stack space */ - a = pn - r; - n = r / es; - goto loop; - } -/* qsort(pn - r, r / es, es, cmp);*/ -} - - -/* EOF */
Modified: trunk/reactos/lib/rtl/rtl.rbuild URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/rtl.rbuild?rev=5377... ============================================================================== --- trunk/reactos/lib/rtl/rtl.rbuild [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/rtl.rbuild [iso-8859-1] Tue Sep 20 17:33:51 2011 @@ -81,7 +81,6 @@ <file>ppb.c</file> <file>process.c</file> <file>propvar.c</file> - <file>qsort.c</file> <file>random.c</file> <file>rangelist.c</file> <file>registry.c</file>
Modified: trunk/reactos/lib/rtl/sd.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/sd.c?rev=53776&... ============================================================================== --- trunk/reactos/lib/rtl/sd.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/sd.c [iso-8859-1] Tue Sep 20 17:33:51 2011 @@ -120,7 +120,7 @@ return STATUS_UNKNOWN_REVISION; }
- pSD->Revision = Revision; + pSD->Revision = SECURITY_DESCRIPTOR_REVISION1; pSD->Sbz1 = 0; pSD->Control = 0; pSD->Owner = NULL; @@ -144,10 +144,10 @@ DWORD OwnerLength, GroupLength; PISECURITY_DESCRIPTOR srcSD = pSourceSecurityDescriptor; PISECURITY_DESCRIPTOR destSD = pDestinationSecurityDescriptor; - + if (srcSD->Revision != SECURITY_DESCRIPTOR_REVISION) return STATUS_UNKNOWN_REVISION; - + /* Copy non relative dependent data */ destSD->Revision = srcSD->Revision; destSD->Sbz1 = srcSD->Sbz1; @@ -230,7 +230,7 @@ return STATUS_UNKNOWN_REVISION; }
- SecurityDescriptor->Revision = Revision; + SecurityDescriptor->Revision = SECURITY_DESCRIPTOR_REVISION1; SecurityDescriptor->Sbz1 = 0; SecurityDescriptor->Control = SE_SELF_RELATIVE; SecurityDescriptor->Owner = 0;
Modified: trunk/reactos/lib/rtl/sid.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/sid.c?rev=53776&... ============================================================================== --- trunk/reactos/lib/rtl/sid.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/sid.c [iso-8859-1] Tue Sep 20 17:33:51 2011 @@ -332,7 +332,7 @@ { WCHAR Buffer[256]; PWSTR wcs; - ULONG Length; + SIZE_T Length; ULONG i; PISID Sid = Sid_;
@@ -387,7 +387,7 @@ if (Length > String->MaximumLength) return STATUS_BUFFER_TOO_SMALL;
- String->Length = Length; + String->Length = (USHORT)Length; RtlCopyMemory (String->Buffer, Buffer, Length);