summaryrefslogtreecommitdiffstats
path: root/include/osl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-15 09:13:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-15 11:24:09 +0200
commit72d8f2961fd7f5670fe2564eeb3aa14a6eaf0d8d (patch)
tree7185da37593987f6084254f46705e2fe0890da65 /include/osl
parentRevert "NFC writerfilter: remove pointless asserts" (diff)
downloadcore-72d8f2961fd7f5670fe2564eeb3aa14a6eaf0d8d.tar.gz
core-72d8f2961fd7f5670fe2564eeb3aa14a6eaf0d8d.zip
loplugin:buriedassign in sal
Change-Id: I5a7bc9378ceacb9116c03e3a9fc01c5675c40908 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92243 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/osl')
-rw-r--r--include/osl/profile.hxx14
-rw-r--r--include/osl/socket.hxx3
2 files changed, 14 insertions, 3 deletions
diff --git a/include/osl/profile.hxx b/include/osl/profile.hxx
index b62ea0628ca7..0ce69a8aea3b 100644
--- a/include/osl/profile.hxx
+++ b/include/osl/profile.hxx
@@ -160,8 +160,13 @@ namespace osl {
sal_Char* pBuf = new sal_Char[ n+1 ];
osl_getProfileSectionEntries( profile, rSection.getStr(), pBuf, n+1 );
size_t nLen;
- for( n = 0; ( nLen = strlen( pBuf+n ) ); n += nLen+1 )
+ for( n = 0; ; n += nLen+1 )
+ {
+ nLen = strlen( pBuf+n );
+ if (!nLen)
+ break;
aEntries.push_back( rtl::OString( pBuf+n ) );
+ }
delete[] pBuf;
}
@@ -182,8 +187,13 @@ namespace osl {
sal_Char* pBuf = new sal_Char[ n+1 ];
osl_getProfileSections( profile, pBuf, n+1 );
size_t nLen;
- for( n = 0; ( nLen = strlen( pBuf+n ) ); n += nLen+1 )
+ for( n = 0; ; n += nLen+1 )
+ {
+ nLen = strlen( pBuf+n );
+ if (!nLen)
+ break;
aSections.push_back( rtl::OString( pBuf+n ) );
+ }
delete[] pBuf;
}
diff --git a/include/osl/socket.hxx b/include/osl/socket.hxx
index 640880144177..2ea81fcfd3e0 100644
--- a/include/osl/socket.hxx
+++ b/include/osl/socket.hxx
@@ -242,7 +242,8 @@ namespace osl
inline Socket& Socket::operator= (const Socket& sock)
{
- return (*this) = sock.getHandle();
+ *this = sock.getHandle();
+ return *this;
}