diff options
author | wdenk <wdenk> | 2003-06-27 21:31:46 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2003-06-27 21:31:46 +0000 |
commit | 8bde7f776c77b343aca29b8c7b58464d915ac245 (patch) | |
tree | 20f1fd99975215e7c658454a15cdb4ed4694e2d4 /board/MAI/bios_emulator/scitech/src/pm/ntdrv/stdlib.c | |
parent | 993cad9364c6b87ae429d1ed1130d8153f6f027e (diff) |
* Code cleanup:LABEL_2003_06_27_2340
- remove trailing white space, trailing empty lines, C++ comments, etc.
- split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)
* Patches by Kenneth Johansson, 25 Jun 2003:
- major rework of command structure
(work done mostly by Michal Cendrowski and Joakim Kristiansen)
Diffstat (limited to 'board/MAI/bios_emulator/scitech/src/pm/ntdrv/stdlib.c')
-rw-r--r-- | board/MAI/bios_emulator/scitech/src/pm/ntdrv/stdlib.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/board/MAI/bios_emulator/scitech/src/pm/ntdrv/stdlib.c b/board/MAI/bios_emulator/scitech/src/pm/ntdrv/stdlib.c index d7705130b73..bbf0cbf4a76 100644 --- a/board/MAI/bios_emulator/scitech/src/pm/ntdrv/stdlib.c +++ b/board/MAI/bios_emulator/scitech/src/pm/ntdrv/stdlib.c @@ -54,7 +54,7 @@ void * calloc( { void *p = PM_mallocShared(nelem * size); if (p) - memset(p,0,nelem * size); + memset(p,0,nelem * size); return p; } @@ -68,9 +68,9 @@ void * realloc( { void *p = PM_mallocShared(size); if (p) { - memcpy(p,ptr,size); - PM_freeShared(ptr); - } + memcpy(p,ptr,size); + PM_freeShared(ptr); + } return p; } @@ -102,21 +102,21 @@ UNICODE_STRING *_PM_CStringToUnicodeString( ANSI_STRING ansiStr; UNICODE_STRING *uniStr; - // Allocate memory for the string structure + /* Allocate memory for the string structure */ if ((uniStr = ExAllocatePool(NonPagedPool, sizeof(UNICODE_STRING))) == NULL) - return NULL; + return NULL; - // Allocate memory for the wide string itself + /* Allocate memory for the wide string itself */ length = (strlen(cstr) * sizeof(WCHAR)) + sizeof(WCHAR); if ((uniStr->Buffer = ExAllocatePool(NonPagedPool, length)) == NULL) { - ExFreePool(uniStr); - return NULL; - } + ExFreePool(uniStr); + return NULL; + } RtlZeroMemory(uniStr->Buffer, length); uniStr->Length = 0; uniStr->MaximumLength = (USHORT)length; - // Convert filename string to ansi string and then to UniCode string + /* Convert filename string to ansi string and then to UniCode string */ RtlInitAnsiString(&ansiStr, cstr); RtlAnsiStringToUnicodeString(uniStr, &ansiStr, FALSE); return uniStr; @@ -133,8 +133,7 @@ void _PM_FreeUnicodeString( UNICODE_STRING *uniStr) { if (uniStr) { - ExFreePool(uniStr->Buffer); - ExFreePool(uniStr); - } + ExFreePool(uniStr->Buffer); + ExFreePool(uniStr); + } } - |