Switch out ints for proper types in NetworkConnection.{h,mm}
authorRobert Sesek <rsesek@bluestatic.org>
Tue, 11 Jan 2011 02:36:19 +0000 (21:36 -0500)
committerRobert Sesek <rsesek@bluestatic.org>
Tue, 11 Jan 2011 02:36:19 +0000 (21:36 -0500)
Source/NetworkConnection.h
Source/NetworkConnection.mm

index efd01633b15b6d65f3c68bdd4d0f7db62a9ce478..14642e68d2baab9fc89b4d48e021677b9edaa02b 100644 (file)
@@ -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<NetworkConnectionDelegate>* delegate_;
index cbd27646e868f773e3fc1f1652763102118b7825..de9adf2c7684da6181cf4c84a9dc514d8d80de9f 100644 (file)
@@ -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");