Initialize wcbuf with an empty initializer

This commit is contained in:
Takumi Sueda 2022-04-19 03:20:33 +09:00
parent a7f9d3126b
commit 78554fba0b

View File

@ -175,8 +175,7 @@ static void ShowMessage(std::string msg, std::string title, UINT typ)
static bool doLinux() static bool doLinux()
{ {
wchar_t wcbuf[256]; wchar_t wcbuf[256] = {};
int i;
std::ifstream iVersion; std::ifstream iVersion;
std::string line, model; std::string line, model;
@ -187,11 +186,6 @@ static bool doLinux()
HANDLE hUBoot; HANDLE hUBoot;
DWORD wReadSize; DWORD wReadSize;
for (i = 0; i < int(sizeof(wcbuf) / sizeof(wcbuf[0])); i++)
{
wcbuf[i] = '\0';
}
iVersion.open("\\NAND\\version.txt"); iVersion.open("\\NAND\\version.txt");
while (getline(iVersion, line)) while (getline(iVersion, line))
{ {