summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/postgresql/pq_statics.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_statics.cxx b/connectivity/source/drivers/postgresql/pq_statics.cxx
index 0bec73919687..100c16c070f4 100644
--- a/connectivity/source/drivers/postgresql/pq_statics.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statics.cxx
@@ -108,12 +108,7 @@ static cppu::IPropertyArrayHelper * createPropertyArrayHelper(
Statics & getStatics()
{
- static Statics * p;
- if( ! p )
- {
- ::osl::MutexGuard guard( ::osl::Mutex::getGlobalMutex() );
- if( ! p )
- {
+ static Statics* p = []() {
static Statics statics ;
statics.SYSTEM_TABLE = "SYSTEM TABLE";
statics.TABLE = "TABLE";
@@ -665,9 +660,8 @@ Statics & getStatics()
defTypeInfoMetaData[i].isAutoIncrement ) );
}
- p = &statics;
- }
- }
+ return &statics;
+ }();
return *p;
}