From 78554fba0b6a60f005d0a13e00cdbc59f941ef14 Mon Sep 17 00:00:00 2001 From: Takumi Sueda Date: Tue, 19 Apr 2022 03:20:33 +0900 Subject: [PATCH] Initialize wcbuf with an empty initializer --- BrainLILODrv.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/BrainLILODrv.cpp b/BrainLILODrv.cpp index de6eafc..e8ac0fc 100644 --- a/BrainLILODrv.cpp +++ b/BrainLILODrv.cpp @@ -175,8 +175,7 @@ static void ShowMessage(std::string msg, std::string title, UINT typ) static bool doLinux() { - wchar_t wcbuf[256]; - int i; + wchar_t wcbuf[256] = {}; std::ifstream iVersion; std::string line, model; @@ -187,11 +186,6 @@ static bool doLinux() HANDLE hUBoot; DWORD wReadSize; - for (i = 0; i < int(sizeof(wcbuf) / sizeof(wcbuf[0])); i++) - { - wcbuf[i] = '\0'; - } - iVersion.open("\\NAND\\version.txt"); while (getline(iVersion, line)) {