summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaliy Anderson <vanderson@smartru.com>2017-03-30 17:11:32 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2017-03-30 17:42:11 +0000
commitc12035df53f5031bd9f1840153b67e6189f3dea3 (patch)
tree847a97bfac5565c1d121bfa0ec8c955df87efe04
parentc568eb7d3bb4584867f0a1f0a7965f73097f009b (diff)
NeonSession_NeonAuth(): avoid redundant OUString->OString conversion
Change-Id: I6b8515c25d58a88a040d4e08e36ffbd442228828 Reviewed-on: https://gerrit.libreoffice.org/35915 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--ucb/source/ucp/webdav-neon/NeonSession.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx
index 7e21205e6b59..8f6a625ccfee 100644
--- a/ucb/source/ucp/webdav-neon/NeonSession.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx
@@ -311,27 +311,23 @@ extern "C" int NeonSession_NeonAuth( void * inUserData,
thePassWord,
bCanUseSystemCreds);
- OString aUser(
- OUStringToOString( theUserName, RTL_TEXTENCODING_UTF8 ) );
+ OString aUser( OUStringToOString( theUserName, RTL_TEXTENCODING_UTF8 ) );
if ( aUser.getLength() > ( NE_ABUFSIZ - 1 ) )
{
SAL_WARN( "ucb.ucp.webdav", "NeonSession_NeonAuth - username too long!" );
return -1;
}
- OString aPass(
- OUStringToOString( thePassWord, RTL_TEXTENCODING_UTF8 ) );
+ OString aPass( OUStringToOString( thePassWord, RTL_TEXTENCODING_UTF8 ) );
if ( aPass.getLength() > ( NE_ABUFSIZ - 1 ) )
{
SAL_WARN( "ucb.ucp.webdav", "NeonSession_NeonAuth - password too long!" );
return -1;
}
- strcpy( inoutUserName, // #100211# - checked
- OUStringToOString( theUserName, RTL_TEXTENCODING_UTF8 ).getStr() );
-
- strcpy( inoutPassWord, // #100211# - checked
- OUStringToOString( thePassWord, RTL_TEXTENCODING_UTF8 ).getStr() );
+ // #100211# - checked
+ strcpy( inoutUserName, aUser.getStr() );
+ strcpy( inoutPassWord, aPass.getStr() );
return theRetVal;
}