@@ -489,23 +489,17 @@ queryData = [OFMutableData dataWithCapacity: 512]; /* Header */ tmp = OF_BSWAP16_IF_LE(_ID.unsignedShortValue); - [queryData addItems: &tmp - count: 2]; - + [queryData addItems: &tmp count: 2]; /* RD */ tmp = OF_BSWAP16_IF_LE(1u << 8); - [queryData addItems: &tmp - count: 2]; - + [queryData addItems: &tmp count: 2]; /* QDCOUNT */ tmp = OF_BSWAP16_IF_LE(1); - [queryData addItems: &tmp - count: 2]; - + [queryData addItems: &tmp count: 2]; /* ANCOUNT, NSCOUNT and ARCOUNT */ [queryData increaseCountBy: 6]; /* Question */ @@ -524,18 +518,14 @@ count: length]; } /* QTYPE */ tmp = OF_BSWAP16_IF_LE(_query.recordType); - [queryData addItems: &tmp - count: 2]; - + [queryData addItems: &tmp count: 2]; /* QCLASS */ tmp = OF_BSWAP16_IF_LE(_query.DNSClass); - [queryData addItems: &tmp - count: 2]; - + [queryData addItems: &tmp count: 2]; [queryData makeImmutable]; _queryData = [queryData copy]; objc_autoreleasePoolPop(pool); @@ -830,12 +820,11 @@ context = [[[OFDNSResolverContext alloc] initWithQuery: query ID: ID settings: _settings delegate: delegate] autorelease]; - [self of_sendQueryForContext: context - runLoopMode: runLoopMode]; + [self of_sendQueryForContext: context runLoopMode: runLoopMode]; objc_autoreleasePoolPop(pool); } - (void)of_contextTimedOut: (OFDNSResolverContext *)context @@ -854,19 +843,17 @@ } if (context->_nameServersIndex + 1 < context->_settings->_nameServers.count) { context->_nameServersIndex++; - [self of_sendQueryForContext: context - runLoopMode: runLoopMode]; + [self of_sendQueryForContext: context runLoopMode: runLoopMode]; return; } if (++context->_attempt < context->_settings->_maxAttempts) { context->_nameServersIndex = 0; - [self of_sendQueryForContext: context - runLoopMode: runLoopMode]; + [self of_sendQueryForContext: context runLoopMode: runLoopMode]; return; } context = [[context retain] autorelease]; [_queries removeObjectForKey: context->_ID]; @@ -874,16 +861,14 @@ /* * Cancel any pending queries, to avoid a send being still pending and * trying to access the query once it no longer exists. */ [_IPv4Socket cancelAsyncRequests]; - [_IPv4Socket asyncReceiveIntoBuffer: _buffer - length: BUFFER_LENGTH]; + [_IPv4Socket asyncReceiveIntoBuffer: _buffer length: BUFFER_LENGTH]; #ifdef OF_HAVE_IPV6 [_IPv6Socket cancelAsyncRequests]; - [_IPv6Socket asyncReceiveIntoBuffer: _buffer - length: BUFFER_LENGTH]; + [_IPv6Socket asyncReceiveIntoBuffer: _buffer length: BUFFER_LENGTH]; #endif exception = [OFDNSQueryFailedException exceptionWithQuery: context->_query error: OF_DNS_RESOLVER_ERROR_TIMEOUT]; @@ -1099,12 +1084,11 @@ context->_TCPQueryData = [[OFMutableData alloc] initWithCapacity: queryDataCount + 2]; tmp = OF_BSWAP16_IF_LE(queryDataCount); - [context->_TCPQueryData addItems: &tmp - count: sizeof(tmp)]; + [context->_TCPQueryData addItems: &tmp count: sizeof(tmp)]; [context->_TCPQueryData addItems: context->_queryData.items count: queryDataCount]; } [sock asyncWriteData: context->_TCPQueryData]; @@ -1133,12 +1117,11 @@ } if (context->_TCPBuffer == nil) context->_TCPBuffer = of_alloc(MAX_DNS_RESPONSE_LENGTH, 1); - [sock asyncReadIntoBuffer: context->_TCPBuffer - exactLength: 2]; + [sock asyncReadIntoBuffer: context->_TCPBuffer exactLength: 2]; return nil; } - (bool)stream: (OFStream *)stream didReadIntoBuffer: (void *)buffer @@ -1181,13 +1164,11 @@ * The connection was closed before we received the entire * response. */ goto done; - [self of_handleResponseBuffer: buffer - length: length - sender: NULL]; + [self of_handleResponseBuffer: buffer length: length sender: NULL]; done: [_TCPQueries removeObjectForKey: context->_TCPSocket]; [context->_TCPSocket release]; context->_TCPSocket = nil;