aboutsummaryrefslogtreecommitdiff
path: root/Foundation/GTMLogger+ASL.m
diff options
context:
space:
mode:
Diffstat (limited to 'Foundation/GTMLogger+ASL.m')
-rw-r--r--Foundation/GTMLogger+ASL.m7
1 files changed, 4 insertions, 3 deletions
diff --git a/Foundation/GTMLogger+ASL.m b/Foundation/GTMLogger+ASL.m
index 435cec3..58bc710 100644
--- a/Foundation/GTMLogger+ASL.m
+++ b/Foundation/GTMLogger+ASL.m
@@ -112,6 +112,7 @@
level:(GTMLoggerLevel)level {
return [NSString stringWithFormat:@"%@ %@",
[self prettyNameForFunc:func],
+ // |super| has guard for nil |fmt| and |args|
[super stringForFunc:func withFormat:fmt valist:args level:level]];
}
@@ -127,7 +128,7 @@
- (id)initWithFacility:(NSString *)facility {
if ((self = [super init])) {
client_ = asl_open(NULL, [facility UTF8String], 0);
- if (client_ == nil) {
+ if (client_ == NULL) {
// COV_NF_START - no real way to test this
[self release];
return nil;
@@ -138,13 +139,13 @@
}
- (void)dealloc {
- if (client_) asl_close(client_);
+ if (client_ != NULL) asl_close(client_);
[super dealloc];
}
#if GTM_SUPPORT_GC
- (void)finalize {
- if (client_) asl_close(client_);
+ if (client_ != NULL) asl_close(client_);
[super finalize];
}
#endif