From 6cd0d2a21068af5260de114efdf3a299a757e3eb Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 10 Jan 2011 21:36:19 -0500 Subject: [PATCH] Switch out ints for proper types in NetworkConnection.{h,mm} --- Source/NetworkConnection.h | 4 ++-- Source/NetworkConnection.mm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/NetworkConnection.h b/Source/NetworkConnection.h index efd0163..14642e6 100644 --- a/Source/NetworkConnection.h +++ b/Source/NetworkConnection.h @@ -81,8 +81,8 @@ class NetworkCallbackController; // Information about the current read loop. We append to |currentPacket_| // until |currentPacketSize_| has reached |packetSize_|. NSMutableString* currentPacket_; - int packetSize_; - int currentPacketIndex_; + NSInteger packetSize_; + NSInteger currentPacketIndex_; // The delegate. All methods are executed on the main thread. NSObject* delegate_; diff --git a/Source/NetworkConnection.mm b/Source/NetworkConnection.mm index cbd2764..de9adf2 100644 --- a/Source/NetworkConnection.mm +++ b/Source/NetworkConnection.mm @@ -525,7 +525,7 @@ void PerformQuitSignal(void* info) BOOL done = NO; char* string = (char*)[command UTF8String]; - int stringLength = strlen(string); + size_t stringLength = strlen(string); // Busy wait while writing. BAADD. Should background this operation. while (!done) @@ -533,7 +533,7 @@ void PerformQuitSignal(void* info) if (CFWriteStreamCanAcceptBytes(writeStream_)) { // Include the NULL byte in the string when we write. - int bytesWritten = CFWriteStreamWrite(writeStream_, (UInt8*)string, stringLength + 1); + CFIndex bytesWritten = CFWriteStreamWrite(writeStream_, (UInt8*)string, stringLength + 1); if (bytesWritten < 0) { NSLog(@"write error"); -- 2.43.5