@@ -4219,7 +4219,7 @@ - (void)doReadData
4219
4219
}
4220
4220
4221
4221
BOOL hasBytesAvailable = NO ;
4222
- unsigned long estimatedBytesAvailable;
4222
+ unsigned long estimatedBytesAvailable = 0 ;
4223
4223
4224
4224
if ([self usingCFStreamForTLS ])
4225
4225
{
@@ -4237,10 +4237,10 @@ - (void)doReadData
4237
4237
}
4238
4238
else
4239
4239
{
4240
- #if SECURE_TRANSPORT_MAYBE_AVAILABLE
4241
-
4242
4240
estimatedBytesAvailable = socketFDBytesAvailable;
4243
4241
4242
+ #if SECURE_TRANSPORT_MAYBE_AVAILABLE
4243
+
4244
4244
if (flags & kSocketSecure )
4245
4245
{
4246
4246
// There are 2 buffers to be aware of here.
@@ -4277,9 +4277,9 @@ - (void)doReadData
4277
4277
estimatedBytesAvailable += sslInternalBufSize;
4278
4278
}
4279
4279
4280
- hasBytesAvailable = (estimatedBytesAvailable > 0 );
4281
-
4282
4280
#endif
4281
+
4282
+ hasBytesAvailable = (estimatedBytesAvailable > 0 );
4283
4283
}
4284
4284
4285
4285
if ((hasBytesAvailable == NO ) && ([preBuffer availableBytes ] == 0 ))
@@ -4884,7 +4884,7 @@ - (void)doReadEOF
4884
4884
[self flushSSLBuffers ];
4885
4885
}
4886
4886
4887
- BOOL shouldDisconnect;
4887
+ BOOL shouldDisconnect = NO ;
4888
4888
NSError *error = nil ;
4889
4889
4890
4890
if ((flags & kStartingReadTLS ) || (flags & kStartingWriteTLS ))
@@ -5011,7 +5011,7 @@ - (void)completeCurrentRead
5011
5011
NSAssert (currentRead, @" Trying to complete current read when there is no current read." );
5012
5012
5013
5013
5014
- NSData *result;
5014
+ NSData *result = nil ;
5015
5015
5016
5016
if (currentRead->bufferOwner )
5017
5017
{
0 commit comments