Skip to content
Snippets Groups Projects
Commit b6f62d69 authored by Joerg Bornemann's avatar Joerg Bornemann
Browse files

use struct initialization instead of ZeroMemory in process_ctrlc_stub

Change-Id: I8fa85c7a861e9f3f4067d12c894b0a1d30541eb5
Reviewed-on: http://codereview.qt.nokia.com/3675


Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@nokia.com>
parent 57ae675e
No related branches found
No related tags found
No related merge requests found
...@@ -70,8 +70,7 @@ int main(int argc, char **) ...@@ -70,8 +70,7 @@ int main(int argc, char **)
SetConsoleCtrlHandler(ctrlHandler, TRUE); SetConsoleCtrlHandler(ctrlHandler, TRUE);
uiShutDownWindowMessage = RegisterWindowMessage(L"qtcctrlcstub_shutdown"); uiShutDownWindowMessage = RegisterWindowMessage(L"qtcctrlcstub_shutdown");
WNDCLASSEX wcex; WNDCLASSEX wcex = {0};
ZeroMemory(&wcex, sizeof(wcex));
wcex.cbSize = sizeof(wcex); wcex.cbSize = sizeof(wcex);
wcex.lpfnWndProc = WndProc; wcex.lpfnWndProc = WndProc;
wcex.hInstance = GetModuleHandle(0); wcex.hInstance = GetModuleHandle(0);
...@@ -155,13 +154,11 @@ DWORD WINAPI processWatcherThread(LPVOID lpParameter) ...@@ -155,13 +154,11 @@ DWORD WINAPI processWatcherThread(LPVOID lpParameter)
bool startProcess(wchar_t *pCommandLine) bool startProcess(wchar_t *pCommandLine)
{ {
SECURITY_ATTRIBUTES sa; SECURITY_ATTRIBUTES sa = {0};
ZeroMemory(&sa, sizeof(sa));
sa.nLength = sizeof(sa); sa.nLength = sizeof(sa);
sa.bInheritHandle = TRUE; sa.bInheritHandle = TRUE;
STARTUPINFO si; STARTUPINFO si = {0};
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si); si.cb = sizeof(si);
PROCESS_INFORMATION pi; PROCESS_INFORMATION pi;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment