Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] coverity issues #12375

Merged
merged 9 commits into from Jun 30, 2017
Prev

[fix][Win32SMB] CID 77787: Structurally dead code

  • Loading branch information...
Rechi committed Jun 30, 2017
commit 9e1ea8888faa751445f233d150d9f031edda1ab9
@@ -642,15 +642,15 @@ bool CWin32SMBDirectory::ConnectAndAuthenticate(CURL& url, bool allowPromptForCr
{
CLog::LogF(LOGERROR, "Can't convert username \"%s\" to wide string", url.GetUserName().c_str());
return false;
std::wstring domainW;
if (!url.GetDomain().empty() && !g_charsetConverter.utf8ToW(url.GetDomain(), domainW, false, false, true))
{
CLog::LogF(LOGERROR, "Can't convert domain name \"%s\" to wide string", url.GetDomain().c_str());
return false;
}
if (!domainW.empty())
usernameW += L'@' + domainW;
}
std::wstring domainW;
if (!url.GetDomain().empty() && !g_charsetConverter.utf8ToW(url.GetDomain(), domainW, false, false, true))
{
CLog::LogF(LOGERROR, "Can't convert domain name \"%s\" to wide string", url.GetDomain().c_str());
return false;
}
if (!domainW.empty())
usernameW += L'@' + domainW;

std::wstring passwordW;
if (!url.GetPassWord().empty() && !g_charsetConverter.utf8ToW(url.GetPassWord(), passwordW, false, false, true))
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.