From 395fc1226f1225b267f912f4a860ad52ef6f4e0a Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 1 Nov 2018 12:54:38 -0700 Subject: [PATCH] Cleaner code using nil messaging --- src/objective-c/GRPCClient/private/GRPCHost.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/objective-c/GRPCClient/private/GRPCHost.m b/src/objective-c/GRPCClient/private/GRPCHost.m index 480e4621845..8a59bd43d74 100644 --- a/src/objective-c/GRPCClient/private/GRPCHost.m +++ b/src/objective-c/GRPCClient/private/GRPCHost.m @@ -143,9 +143,7 @@ static NSMutableDictionary *gHostCache; GRPCCallOptions *callOptions = nil; @synchronized(gHostCache) { - if ([gHostCache objectForKey:host]) { - callOptions = [gHostCache[host] callOptions]; - } + callOptions = [gHostCache[host] callOptions]; } if (callOptions == nil) { callOptions = [[GRPCCallOptions alloc] init];