Fix few comments, no code changes.

svn path=/trunk/; revision=68807
This commit is contained in:
Hermès Bélusca-Maïto 2015-08-24 01:42:52 +00:00
parent ef41fe2284
commit 57c8922ec2

View file

@ -781,7 +781,7 @@ BaseCreateVDMEnvironment(IN PWCHAR lpEnvironment,
/* /*
* Count how much space the whole environment takes. The environment block is * Count how much space the whole environment takes. The environment block is
* doubly NULL-terminated (NULL from last string and final terminating NULL). * doubly NULL-terminated (NULL from last string and final NULL terminator).
*/ */
SourcePtr = Environment; SourcePtr = Environment;
while (!(*SourcePtr++ == UNICODE_NULL && *SourcePtr == UNICODE_NULL)) while (!(*SourcePtr++ == UNICODE_NULL && *SourcePtr == UNICODE_NULL))
@ -871,7 +871,7 @@ BaseCreateVDMEnvironment(IN PWCHAR lpEnvironment,
else else
{ {
/* /*
* Invalid stuff starting with '=', ie: * Invalid stuff starting with '=', i.e.:
* =? (with '?' not being a letter) * =? (with '?' not being a letter)
* =X??? (with '?' not being ":=" and not followed by something longer than 3 characters) * =X??? (with '?' not being ":=" and not followed by something longer than 3 characters)
* =X:=??? (with '?' not being "X:\\") * =X:=??? (with '?' not being "X:\\")
@ -888,7 +888,7 @@ BaseCreateVDMEnvironment(IN PWCHAR lpEnvironment,
if (NameType == EnvNameNotAPath) if (NameType == EnvNameNotAPath)
{ {
/* Copy everything (up to the NULL terminator included) */ /* Copy everything, including the NULL terminator */
do do
{ {
*DestPtr++ = *SourcePtr; *DestPtr++ = *SourcePtr;
@ -911,14 +911,14 @@ BaseCreateVDMEnvironment(IN PWCHAR lpEnvironment,
SourcePtr += NameLength; SourcePtr += NameLength;
/* Copy the terminating NULL character */ /* Copy the NULL terminator */
*DestPtr++ = *SourcePtr++; *DestPtr++ = *SourcePtr++;
} }
else // if (NameType == EnvNameMultiplePath) else // if (NameType == EnvNameMultiplePath)
{ {
WCHAR Delimiter; WCHAR Delimiter;
/* Loop through the list of paths (separated by ';') and convert each path to its short form */ /* Loop through the list of paths (delimited by ';') and convert each path to its short form */
do do
{ {
/* Copy any trailing ';' before going to the next path */ /* Copy any trailing ';' before going to the next path */
@ -929,7 +929,7 @@ BaseCreateVDMEnvironment(IN PWCHAR lpEnvironment,
StartPtr = SourcePtr; StartPtr = SourcePtr;
/* Find the next path list separator, or terminating NULL */ /* Find the next path list delimiter or the NULL terminator */
while (*SourcePtr != UNICODE_NULL && *SourcePtr != L';') while (*SourcePtr != UNICODE_NULL && *SourcePtr != L';')
{ {
++SourcePtr; ++SourcePtr;
@ -940,8 +940,8 @@ BaseCreateVDMEnvironment(IN PWCHAR lpEnvironment,
if (NameLength) if (NameLength)
{ {
/* /*
* Temporarily replace the possible path list separator by NULL. * Temporarily replace the possible path list delimiter by NULL.
* 'lpEnvironment' must point to a read+write memory buffer. * 'lpEnvironment' must point to a read+write memory buffer!
*/ */
*SourcePtr = UNICODE_NULL; *SourcePtr = UNICODE_NULL;
@ -958,7 +958,7 @@ BaseCreateVDMEnvironment(IN PWCHAR lpEnvironment,
if (NumChars > NameLength) if (NumChars > NameLength)
Remaining -= (NumChars - NameLength); Remaining -= (NumChars - NameLength);
/* If removed, restore the path list separator in the source environment value and copy it */ /* If removed, restore the path list delimiter in the source environment value and copy it */
if (Delimiter != UNICODE_NULL) if (Delimiter != UNICODE_NULL)
{ {
*SourcePtr = Delimiter; *SourcePtr = Delimiter;
@ -967,7 +967,7 @@ BaseCreateVDMEnvironment(IN PWCHAR lpEnvironment,
} }
} while (*SourcePtr != UNICODE_NULL); } while (*SourcePtr != UNICODE_NULL);
/* Copy the terminating NULL character */ /* Copy the NULL terminator */
*DestPtr++ = *SourcePtr++; *DestPtr++ = *SourcePtr++;
} }
} }
@ -980,7 +980,7 @@ BaseCreateVDMEnvironment(IN PWCHAR lpEnvironment,
(DestPtr - NewEnvironment) * sizeof(WCHAR)); (DestPtr - NewEnvironment) * sizeof(WCHAR));
UnicodeEnv->Length = UnicodeEnv->MaximumLength; UnicodeEnv->Length = UnicodeEnv->MaximumLength;
/* Create its ASCII version */ /* Create its ANSI version */
Status = RtlUnicodeStringToAnsiString(AnsiEnv, UnicodeEnv, TRUE); Status = RtlUnicodeStringToAnsiString(AnsiEnv, UnicodeEnv, TRUE);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
@ -1025,7 +1025,7 @@ BaseDestroyVDMEnvironment(IN PANSI_STRING AnsiEnv,
{ {
ULONG Dummy = 0; ULONG Dummy = 0;
/* Clear the ASCII buffer since Rtl creates this for us */ /* Clear the ANSI buffer since Rtl creates this for us */
if (AnsiEnv->Buffer) RtlFreeAnsiString(AnsiEnv); if (AnsiEnv->Buffer) RtlFreeAnsiString(AnsiEnv);
/* The Unicode buffer is build by hand, though */ /* The Unicode buffer is build by hand, though */