From f565d00969a5b055bf24f2fc5955f46e11425c08 Mon Sep 17 00:00:00 2001 From: ip_gpu Date: Tue, 21 Nov 2017 13:53:55 +0500 Subject: [PATCH] fixed from PVS-Studio: V547 Expression '0 == hSession' is always false. gyazowin.cpp 863 V547 Expression '0 == hSession' is always false. gyazowin.cpp 873 See details in pull request. --- gyazowin/gyazowin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gyazowin/gyazowin.cpp b/gyazowin/gyazowin.cpp index 352d87a..a7aacd3 100644 --- a/gyazowin/gyazowin.cpp +++ b/gyazowin/gyazowin.cpp @@ -860,7 +860,7 @@ BOOL uploadFile(HWND hwnd, LPCTSTR fileName) HINTERNET hConnection = InternetConnect(hSession, UPLOAD_SERVER, INTERNET_DEFAULT_HTTP_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0, NULL); - if(NULL == hSession) { + if(NULL == hConnection) { MessageBox(hwnd, _T("Cannot initiate connection"), szTitle, MB_ICONERROR | MB_OK); return FALSE; @@ -870,7 +870,7 @@ BOOL uploadFile(HWND hwnd, LPCTSTR fileName) HINTERNET hRequest = HttpOpenRequest(hConnection, _T("POST"), UPLOAD_PATH, NULL, NULL, NULL, INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_RELOAD, NULL); - if(NULL == hSession) { + if(NULL == hRequest) { MessageBox(hwnd, _T("Cannot compose post request"), szTitle, MB_ICONERROR | MB_OK); return FALSE;