@@ -488,17 +488,17 @@ queryData = [OFMutableData dataWithCapacity: 512]; /* Header */ - tmp = OF_BSWAP16_IF_LE(_ID.unsignedShortValue); + tmp = OFToBigEndian16(_ID.unsignedShortValue); [queryData addItems: &tmp count: 2]; /* RD */ - tmp = OF_BSWAP16_IF_LE(1u << 8); + tmp = OFToBigEndian16(1u << 8); [queryData addItems: &tmp count: 2]; /* QDCOUNT */ - tmp = OF_BSWAP16_IF_LE(1); + tmp = OFToBigEndian16(1); [queryData addItems: &tmp count: 2]; /* ANCOUNT, NSCOUNT and ARCOUNT */ [queryData increaseCountBy: 6]; /* Question */ @@ -517,14 +517,14 @@ [queryData addItems: component.UTF8String count: length]; } /* QTYPE */ - tmp = OF_BSWAP16_IF_LE(_query.recordType); + tmp = OFToBigEndian16(_query.recordType); [queryData addItems: &tmp count: 2]; /* QCLASS */ - tmp = OF_BSWAP16_IF_LE(_query.DNSClass); + tmp = OFToBigEndian16(_query.DNSClass); [queryData addItems: &tmp count: 2]; [queryData makeImmutable]; _queryData = [queryData copy]; @@ -723,11 +723,11 @@ nameServer = [context->_settings->_nameServers objectAtIndex: context->_nameServersIndex]; if (context->_settings->_usesTCP) { - OF_ENSURE(context->_TCPSocket == nil); + OFEnsure(context->_TCPSocket == nil); context->_TCPSocket = [[OFTCPSocket alloc] init]; [_TCPQueries setObject: context forKey: context->_TCPSocket]; context->_TCPSocket.delegate = self; @@ -1059,11 +1059,11 @@ port: (uint16_t)port exception: (id)exception { OFDNSResolverContext *context = [_TCPQueries objectForKey: sock]; - OF_ENSURE(context != nil); + OFEnsure(context != nil); if (exception != nil) { /* * TODO: Handle error immediately instead of waiting for the * timer to try the next nameserver or to retry. @@ -1083,11 +1083,11 @@ @throw [OFOutOfRangeException exception]; context->_TCPQueryData = [[OFMutableData alloc] initWithCapacity: queryDataCount + 2]; - tmp = OF_BSWAP16_IF_LE(queryDataCount); + tmp = OFToBigEndian16(queryDataCount); [context->_TCPQueryData addItems: &tmp count: sizeof(tmp)]; [context->_TCPQueryData addItems: context->_queryData.items count: queryDataCount]; } @@ -1100,11 +1100,11 @@ exception: (id)exception { OFTCPSocket *sock = (OFTCPSocket *)stream; OFDNSResolverContext *context = [_TCPQueries objectForKey: sock]; - OF_ENSURE(context != nil); + OFEnsure(context != nil); if (exception != nil) { /* * TODO: Handle error immediately instead of waiting for the * timer to try the next nameserver or to retry. @@ -1129,11 +1129,11 @@ exception: (id)exception { OFTCPSocket *sock = (OFTCPSocket *)stream; OFDNSResolverContext *context = [_TCPQueries objectForKey: sock]; - OF_ENSURE(context != nil); + OFEnsure(context != nil); if (exception != nil) { /* * TODO: Handle error immediately instead of waiting for the * timer to try the next nameserver or to retry. @@ -1142,11 +1142,11 @@ } if (context->_responseLength == 0) { unsigned char *ucBuffer = buffer; - OF_ENSURE(length == 2); + OFEnsure(length == 2); context->_responseLength = (ucBuffer[0] << 8) | ucBuffer[1]; if (context->_responseLength > MAX_DNS_RESPONSE_LENGTH) @throw [OFOutOfRangeException exception];