Skip to content

Commit

Permalink
Whitespace cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mikelikespie committed Oct 10, 2012
1 parent 6d2d49d commit 1fda756
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions SocketRocket/SRWebSocket.m
Expand Up @@ -33,6 +33,7 @@

#import <CommonCrypto/CommonDigest.h>
#import <Security/SecRandom.h>

#import "base64.h"
#import "NSData+SRB64Additions.h"

Expand Down Expand Up @@ -1295,15 +1296,13 @@ - (void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode;
}
}

// SRFastLog(@"%@ Got stream event %d", aStream, eventCode);
dispatch_async(_workQueue, ^{
switch (eventCode) {
case NSStreamEventOpenCompleted: {
SRFastLog(@"NSStreamEventOpenCompleted %@", aStream);
if (self.readyState >= SR_CLOSING) {
return;
}


assert(_readBuffer);

Expand Down Expand Up @@ -1383,7 +1382,6 @@ - (void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode;
break;
}
});

}

@end
Expand Down Expand Up @@ -1459,7 +1457,6 @@ - (NSString *)SR_origin;
@end

static inline dispatch_queue_t log_queue() {

static dispatch_queue_t queue = 0;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Expand Down Expand Up @@ -1488,13 +1485,11 @@ static inline void SRFastLog(NSString *format, ...) {
#ifdef HAS_ICU

static inline int32_t validate_dispatch_data_partial_string(NSData *data) {

const void * contents = [data bytes];
long size = [data length];

const uint8_t *str = (const uint8_t *)contents;


UChar32 codepoint = 1;
int32_t offset = 0;
int32_t lastOffset = 0;
Expand All @@ -1513,7 +1508,6 @@ static inline int32_t validate_dispatch_data_partial_string(NSData *data) {
U8_MASK_LEAD_BYTE(leadByte, U8_COUNT_TRAIL_BYTES(leadByte));

for (int i = lastOffset + 1; i < offset; i++) {

if (U8_IS_SINGLE(str[i]) || U8_IS_LEAD(str[i]) || !U8_IS_TRAIL(str[i])) {
size = -1;
}
Expand Down

0 comments on commit 1fda756

Please sign in to comment.