summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2023-12-24 13:12:52 +0100
committerAndras Timar <andras.timar@collabora.com>2024-08-28 16:12:17 +0200
commit82e2031cfca575025baee113d4a3af4252850e84 (patch)
tree2454e604b4f8f252e46a9fc3313b6032b44d5aec /sal
parent6ceabeaf43a1a149bd85ecaaef729c037f0005fc (diff)
-Werror=calloc-transposed-args
Change-Id: I7b8b020bdbcd5b4db4cb478cc5fe1225f19ae0cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161268 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> (cherry picked from commit 4663c56edf788a37545f253e028db99e480feb34) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172463 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/thread.cxx2
-rw-r--r--sal/rtl/hash.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx
index b17f363511c6..3d51f4ab2a33 100644
--- a/sal/osl/unx/thread.cxx
+++ b/sal/osl/unx/thread.cxx
@@ -624,7 +624,7 @@ static oslThreadIdentifier insertThreadId (pthread_t hThread)
if (pEntry == nullptr)
{
- pEntry = static_cast<HashEntry*>(calloc(sizeof(HashEntry), 1));
+ pEntry = static_cast<HashEntry*>(calloc(1, sizeof(HashEntry)));
pEntry->Handle = hThread;
diff --git a/sal/rtl/hash.cxx b/sal/rtl/hash.cxx
index 7cfc443cb972..4e255d965e17 100644
--- a/sal/rtl/hash.cxx
+++ b/sal/rtl/hash.cxx
@@ -79,7 +79,7 @@ static StringHashTable * rtl_str_hash_new(sal_uInt32 nSize)
pHash->nEntries = 0;
pHash->nSize = getNextSize (nSize);
- pHash->pData = static_cast< rtl_uString ** >(calloc(sizeof(rtl_uString *), pHash->nSize));
+ pHash->pData = static_cast< rtl_uString ** >(calloc(pHash->nSize, sizeof(rtl_uString *)));
return pHash;
}