Ben Copsey

Merge pull request #190 from tianzhou/master

need to use NOT NOT maxBandwidthPerSecond instead of (maxBandwidthPerSecond). Otherwise value like 1024 will be false
@@ -4485,12 +4485,12 @@ static NSOperationQueue *sharedQueue = nil; @@ -4485,12 +4485,12 @@ static NSOperationQueue *sharedQueue = nil;
4485 #if TARGET_OS_IPHONE 4485 #if TARGET_OS_IPHONE
4486 [bandwidthThrottlingLock lock]; 4486 [bandwidthThrottlingLock lock];
4487 4487
4488 - BOOL throttle = isBandwidthThrottled || (!shouldThrottleBandwithForWWANOnly && (maxBandwidthPerSecond)); 4488 + BOOL throttle = isBandwidthThrottled || (!shouldThrottleBandwithForWWANOnly && !!maxBandwidthPerSecond);
4489 [bandwidthThrottlingLock unlock]; 4489 [bandwidthThrottlingLock unlock];
4490 return throttle; 4490 return throttle;
4491 #else 4491 #else
4492 [bandwidthThrottlingLock lock]; 4492 [bandwidthThrottlingLock lock];
4493 - BOOL throttle = (maxBandwidthPerSecond); 4493 + BOOL throttle = !!maxBandwidthPerSecond;
4494 [bandwidthThrottlingLock unlock]; 4494 [bandwidthThrottlingLock unlock];
4495 return throttle; 4495 return throttle;
4496 #endif 4496 #endif