Permalink
Browse files

Change to use ASCII encoding instead of implicit encoding of deprecat…

…ed cString/stringWithCString methods.
  • Loading branch information...
uliwitness committed Jan 25, 2011
1 parent dc7f0c5 commit 7e7162ac9e6b23cf18c0e0ef8781e21dbae9bae0
Showing with 2 additions and 2 deletions.
  1. +2 −2 ULINetSocket.m
View
@@ -381,7 +381,7 @@ - (BOOL)connectToHost:(NSString*)inHostname port:(UInt16)inPort timeout:(NSTimeI
return NO;
// Get host information
- socketHost = gethostbyname( [inHostname cString] );
+ socketHost = gethostbyname( [inHostname cStringUsingEncoding: NSASCIIStringEncoding] );
if( !socketHost )
return NO;
@@ -773,7 +773,7 @@ + (void)ignoreBrokenPipes
+(NSString*) stringWithSocketAddress: (struct in_addr*)inAddress
{
- return [NSString stringWithCString:inet_ntoa( *inAddress )];
+ return [NSString stringWithCString: inet_ntoa( *inAddress ) encoding: NSASCIIStringEncoding];
}
#pragma mark -

0 comments on commit 7e7162a

Please sign in to comment.