Skip to content

Commit

Permalink
(style) removed extra spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
Corey Wilson committed Apr 28, 2017
1 parent b47a905 commit 176bb97
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ios/RNNetworkInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ @implementation RNNetworkInfo
RCT_EXPORT_METHOD(getSSID:(RCTResponseSenderBlock)callback)
{
NSArray *interfaceNames = CFBridgingRelease(CNCopySupportedInterfaces());

NSDictionary *SSIDInfo;
NSString *SSID = @"error";

for (NSString *interfaceName in interfaceNames) {
SSIDInfo = CFBridgingRelease(CNCopyCurrentNetworkInfo((__bridge CFStringRef)interfaceName));

if (SSIDInfo.count > 0) {
SSID = SSIDInfo[@"SSID"];
break;
}
}

callback(@[SSID]);
}

Expand All @@ -57,13 +57,13 @@ @implementation RNNetworkInfo
RCT_EXPORT_METHOD(getIPAddress:(RCTResponseSenderBlock)callback)
{
NSString *address = @"error";

struct ifaddrs *interfaces = NULL;
struct ifaddrs *temp_addr = NULL;
int success = 0;

success = getifaddrs(&interfaces);

if (success == 0) {
temp_addr = interfaces;
while(temp_addr != NULL) {
Expand All @@ -75,7 +75,7 @@ @implementation RNNetworkInfo
temp_addr = temp_addr->ifa_next;
}
}

freeifaddrs(interfaces);
callback(@[address]);
}
Expand Down

0 comments on commit 176bb97

Please sign in to comment.