https://git.reactos.org/?p=reactos.git;a=commitdiff;h=13dd01b44cf30c9832254…
commit 13dd01b44cf30c983225469f4bc8724bfd884502
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Wed Nov 4 23:20:03 2020 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Nov 4 23:26:53 2020 +0100
[USETUP] Use pointers to const strings where meaningful.
---
base/setup/usetup/mui.c | 2 +-
base/setup/usetup/mui.h | 10 +++++-----
base/setup/usetup/partlist.c | 6 +++---
base/setup/usetup/usetup.c | 16 ++++++++--------
4 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/base/setup/usetup/mui.c b/base/setup/usetup/mui.c
index e31b2c7e59d..d16caaa8800 100644
--- a/base/setup/usetup/mui.c
+++ b/base/setup/usetup/mui.c
@@ -226,7 +226,7 @@ MUIDisplayError(
va_end(arg_ptr);
}
-LPSTR
+PCSTR
MUIGetString(
ULONG Number)
{
diff --git a/base/setup/usetup/mui.h b/base/setup/usetup/mui.h
index d7618ed56d3..13bedf61edd 100644
--- a/base/setup/usetup/mui.h
+++ b/base/setup/usetup/mui.h
@@ -4,15 +4,15 @@ typedef struct
{
SHORT X;
SHORT Y;
- LPCSTR Buffer;
+ PCSTR Buffer;
DWORD Flags;
INT TextID;
} MUI_ENTRY, *PMUI_ENTRY;
typedef struct
{
- LPCSTR ErrorText;
- LPCSTR ErrorStatus;
+ PCSTR ErrorText;
+ PCSTR ErrorStatus;
} MUI_ERROR;
typedef struct
@@ -24,7 +24,7 @@ typedef struct
typedef struct
{
LONG Number;
- LPSTR String;
+ PCSTR String;
} MUI_STRING;
typedef struct
@@ -68,7 +68,7 @@ MUIDisplayError(
VOID
SetConsoleCodePage(VOID);
-LPSTR
+PCSTR
MUIGetString(
ULONG Number);
diff --git a/base/setup/usetup/partlist.c b/base/setup/usetup/partlist.c
index c35ffed1a42..f62b75b0595 100644
--- a/base/setup/usetup/partlist.c
+++ b/base/setup/usetup/partlist.c
@@ -172,10 +172,10 @@ PrintPartitionData(
USHORT Width;
USHORT Height;
LARGE_INTEGER PartSize;
- PCHAR Unit;
+ PCSTR Unit;
UCHAR Attribute;
CHAR PartTypeString[32];
- PCHAR PartType = PartTypeString;
+ PCSTR PartType = PartTypeString;
Width = ListUi->Right - ListUi->Left - 1;
Height = ListUi->Bottom - ListUi->Top - 2;
@@ -308,7 +308,7 @@ PrintDiskData(
USHORT Width;
USHORT Height;
ULARGE_INTEGER DiskSize;
- PCHAR Unit;
+ PCSTR Unit;
Width = ListUi->Right - ListUi->Left - 1;
Height = ListUi->Bottom - ListUi->Top - 2;
diff --git a/base/setup/usetup/usetup.c b/base/setup/usetup/usetup.c
index b4956d1be46..9b7cabb6324 100644
--- a/base/setup/usetup/usetup.c
+++ b/base/setup/usetup/usetup.c
@@ -144,9 +144,9 @@ DoWatchDestFileName(LPCWSTR FileName)
/* FUNCTIONS ****************************************************************/
static VOID
-PrintString(char* fmt,...)
+PrintString(IN PCSTR fmt,...)
{
- char buffer[512];
+ CHAR buffer[512];
va_list ap;
UNICODE_STRING UnicodeString;
ANSI_STRING AnsiString;
@@ -2065,7 +2065,7 @@ CreatePrimaryPartitionPage(PINPUT_RECORD Ir)
ULONGLONG PartSize;
ULONGLONG DiskSize;
ULONGLONG SectorCount;
- PCHAR Unit;
+ PCSTR Unit;
if (PartitionList == NULL || CurrentPartition == NULL)
{
@@ -2227,7 +2227,7 @@ CreateExtendedPartitionPage(PINPUT_RECORD Ir)
ULONGLONG PartSize;
ULONGLONG DiskSize;
ULONGLONG SectorCount;
- PCHAR Unit;
+ PCSTR Unit;
if (PartitionList == NULL || CurrentPartition == NULL)
{
@@ -2388,7 +2388,7 @@ CreateLogicalPartitionPage(PINPUT_RECORD Ir)
ULONGLONG PartSize;
ULONGLONG DiskSize;
ULONGLONG SectorCount;
- PCHAR Unit;
+ PCSTR Unit;
if (PartitionList == NULL || CurrentPartition == NULL)
{
@@ -2586,7 +2586,7 @@ DeletePartitionPage(PINPUT_RECORD Ir)
PDISKENTRY DiskEntry;
ULONGLONG DiskSize;
ULONGLONG PartSize;
- PCHAR Unit;
+ PCSTR Unit;
CHAR PartTypeString[32];
if (PartitionList == NULL || CurrentPartition == NULL)
@@ -2757,8 +2757,8 @@ SelectFileSystemPage(PINPUT_RECORD Ir)
PDISKENTRY DiskEntry;
ULONGLONG DiskSize;
ULONGLONG PartSize;
- PCHAR DiskUnit;
- PCHAR PartUnit;
+ PCSTR DiskUnit;
+ PCSTR PartUnit;
CHAR PartTypeString[32];
FORMATMACHINESTATE PreviousFormatState;
PCWSTR DefaultFs;