mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
fix minor thread safety issue
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35721 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9e2e614c11
commit
1073f46bb0
1 changed files with 3 additions and 6 deletions
|
@ -220,7 +220,6 @@ static gnutls_anon_client_credentials_t anoncred;
|
|||
|
||||
if (beenHere == NO)
|
||||
{
|
||||
NSUserDefaults *defs;
|
||||
NSProcessInfo *pi;
|
||||
NSBundle *bundle;
|
||||
NSString *str;
|
||||
|
@ -273,8 +272,6 @@ static gnutls_anon_client_credentials_t anoncred;
|
|||
globalDebug = [str intValue];
|
||||
}
|
||||
|
||||
defs = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(_defaultsChanged:)
|
||||
|
@ -313,8 +310,8 @@ static GSTLSDHParams *paramsCurrent = nil;
|
|||
|
||||
+ (GSTLSDHParams*) current
|
||||
{
|
||||
GSTLSDHParams *p;
|
||||
|
||||
GSTLSDHParams *p;
|
||||
|
||||
[paramsLock lock];
|
||||
if (nil == paramsCurrent)
|
||||
{
|
||||
|
@ -333,7 +330,7 @@ static GSTLSDHParams *paramsCurrent = nil;
|
|||
}
|
||||
p = [paramsCurrent retain];
|
||||
[paramsLock unlock];
|
||||
return [paramsCurrent autorelease];
|
||||
return [p autorelease];
|
||||
}
|
||||
|
||||
+ (void) generate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue