ucb/source/ucp/webdav-curl/CurlSession.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 5b4aea0f911764da759b3c2df0fd7803fec42547
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Oct 23 01:14:25 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Oct 23 10:31:03 2024 +0200

    tdf#163486: PVS: Expression is always true
    
    V547    Expression 'pRedirectURL' is always true.
    
    Change-Id: I6cd071905a6e93782c1a6f5e6e4ddeaef0658feb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175460
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 8d933acf200a..e98008487fec 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -1105,9 +1105,7 @@ auto CurlProcessor::ProcessRequestImpl(
                 {
                     // Sharepoint 2016 workaround: contains unencoded U+0020
                     OUString const redirectURL(::rtl::Uri::encode(
-                        pRedirectURL
-                            ? OUString(pRedirectURL, strlen(pRedirectURL), 
RTL_TEXTENCODING_UTF8)
-                            : OUString(),
+                        OUString(pRedirectURL, strlen(pRedirectURL), 
RTL_TEXTENCODING_UTF8),
                         rtl_UriCharClassUric, rtl_UriEncodeKeepEscapes, 
RTL_TEXTENCODING_UTF8));
 
                     throw DAVException(DAVException::DAV_HTTP_REDIRECT, 
redirectURL);

Reply via email to