Use CFRetain here instead of a non-obvious application of CFStringCreateWithFormat.
authorPeter Hosey <hg@boredzo.org>
Tue Sep 01 19:30:48 2009 -0700 (2009-09-01)
changeset 436582f50f3678bb
parent 4364 b000509c2696
child 4366 4ad45ce5a5b9
Use CFRetain here instead of a non-obvious application of CFStringCreateWithFormat.
Core/Source/GrowlPreferencePane.m
     1.1 --- a/Core/Source/GrowlPreferencePane.m	Tue Sep 01 21:33:59 2009 -0400
     1.2 +++ b/Core/Source/GrowlPreferencePane.m	Tue Sep 01 19:30:48 2009 -0700
     1.3 @@ -948,7 +948,7 @@
     1.4  	localHostName = SCDynamicStoreCopyComputerName(/*store*/ NULL,
     1.5  															   /*nameEncoding*/ NULL);
     1.6  	if(!localHostName)
     1.7 -		localHostName = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("localhost"));
     1.8 +		localHostName = CFRetain(CFSTR("localhost"));
     1.9  	
    1.10  	CFComparisonResult isLocalHost = CFStringCompare(localHostName, (CFStringRef)name, 0);
    1.11  	CFRelease(localHostName);