Index: src/OFASN1BitString.m ================================================================== --- src/OFASN1BitString.m +++ src/OFASN1BitString.m @@ -153,10 +153,13 @@ } - (bool)isEqual: (id)object { OFASN1BitString *bitString; + + if (object == self) + return true; if (![object isKindOfClass: [OFASN1BitString class]]) return false; bitString = object; Index: src/OFASN1Boolean.m ================================================================== --- src/OFASN1Boolean.m +++ src/OFASN1Boolean.m @@ -87,10 +87,13 @@ } - (bool)isEqual: (id)object { OFASN1Boolean *boolean; + + if (object == self) + return true; if (![object isKindOfClass: [OFASN1Boolean class]]) return false; boolean = object; Index: src/OFASN1Enumerated.m ================================================================== --- src/OFASN1Enumerated.m +++ src/OFASN1Enumerated.m @@ -74,10 +74,13 @@ } - (bool)isEqual: (id)object { OFASN1Enumerated *enumerated; + + if (object == self) + return true; if (![object isKindOfClass: [OFASN1Enumerated class]]) return false; enumerated = object; Index: src/OFASN1IA5String.m ================================================================== --- src/OFASN1IA5String.m +++ src/OFASN1IA5String.m @@ -95,10 +95,13 @@ } - (bool)isEqual: (id)object { OFASN1IA5String *IA5String; + + if (object == self) + return true; if (![object isKindOfClass: [OFASN1IA5String class]]) return false; IA5String = object; Index: src/OFASN1Integer.m ================================================================== --- src/OFASN1Integer.m +++ src/OFASN1Integer.m @@ -96,10 +96,13 @@ } - (bool)isEqual: (id)object { OFASN1Integer *integer; + + if (object == self) + return true; if (![object isKindOfClass: [OFASN1Integer class]]) return false; integer = object; Index: src/OFASN1NumericString.m ================================================================== --- src/OFASN1NumericString.m +++ src/OFASN1NumericString.m @@ -107,10 +107,13 @@ } - (bool)isEqual: (id)object { OFASN1NumericString *numericString; + + if (object == self) + return true; if (![object isKindOfClass: [OFASN1NumericString class]]) return false; numericString = object; Index: src/OFASN1ObjectIdentifier.m ================================================================== --- src/OFASN1ObjectIdentifier.m +++ src/OFASN1ObjectIdentifier.m @@ -152,10 +152,13 @@ } - (bool)isEqual: (id)object { OFASN1ObjectIdentifier *objectIdentifier; + + if (object == self) + return true; if (![object isKindOfClass: [OFASN1ObjectIdentifier class]]) return false; objectIdentifier = object; Index: src/OFASN1OctetString.m ================================================================== --- src/OFASN1OctetString.m +++ src/OFASN1OctetString.m @@ -80,10 +80,13 @@ } - (bool)isEqual: (id)object { OFASN1OctetString *octetString; + + if (object == self) + return true; if (![object isKindOfClass: [OFASN1OctetString class]]) return false; octetString = object; Index: src/OFASN1PrintableString.m ================================================================== --- src/OFASN1PrintableString.m +++ src/OFASN1PrintableString.m @@ -126,10 +126,13 @@ } - (bool)isEqual: (id)object { OFASN1PrintableString *printableString; + + if (object == self) + return true; if (![object isKindOfClass: [OFASN1PrintableString class]]) return false; printableString = object; Index: src/OFASN1UTF8String.m ================================================================== --- src/OFASN1UTF8String.m +++ src/OFASN1UTF8String.m @@ -94,10 +94,13 @@ } - (bool)isEqual: (id)object { OFASN1UTF8String *UTF8String; + + if (object == self) + return true; if (![object isKindOfClass: [OFASN1UTF8String class]]) return false; UTF8String = object; Index: src/OFASN1Value.m ================================================================== --- src/OFASN1Value.m +++ src/OFASN1Value.m @@ -76,10 +76,13 @@ } - (bool)isEqual: (id)object { OFASN1Value *value; + + if (object == self) + return true; if (![object isKindOfClass: [OFASN1Value class]]) return false; value = object; Index: src/OFColor.m ================================================================== --- src/OFColor.m +++ src/OFColor.m @@ -60,10 +60,13 @@ } - (bool)isEqual: (id)object { OFColor *other; + + if (object == self) + return true; if (![object isKindOfClass: [OFColor class]]) return false; other = object; Index: src/OFDNSQuery.m ================================================================== --- src/OFDNSQuery.m +++ src/OFDNSQuery.m @@ -71,10 +71,13 @@ } - (bool)isEqual: (id)object { OFDNSQuery *query; + + if (object == self) + return true; if (![object isKindOfClass: [OFDNSQuery class]]) return false; query = object; Index: src/OFDNSResourceRecord.m ================================================================== --- src/OFDNSResourceRecord.m +++ src/OFDNSResourceRecord.m @@ -199,29 +199,32 @@ - (const of_socket_address_t *)address { return &_address; } -- (bool)isEqual: (id)otherObject -{ - OFADNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFADNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (!of_socket_address_equal(&otherRecord->_address, &_address)) +- (bool)isEqual: (id)object +{ + OFADNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFADNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (!of_socket_address_equal(&record->_address, &_address)) return false; return true; } @@ -282,29 +285,32 @@ - (const of_socket_address_t *)address { return &_address; } -- (bool)isEqual: (id)otherObject -{ - OFAAAADNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFAAAADNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (!of_socket_address_equal(&otherRecord->_address, &_address)) +- (bool)isEqual: (id)object +{ + OFAAAADNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFAAAADNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (!of_socket_address_equal(&record->_address, &_address)) return false; return true; } @@ -375,30 +381,32 @@ [_alias release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFCNAMEDNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFCNAMEDNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_alias != _alias && - ![otherRecord->_alias isEqual: _alias]) +- (bool)isEqual: (id)object +{ + OFCNAMEDNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFCNAMEDNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_alias != _alias && ![record->_alias isEqual: _alias]) return false; return true; } @@ -473,32 +481,35 @@ [_OS release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFHINFODNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFHINFODNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_CPU != _CPU && ![otherRecord->_CPU isEqual: _CPU]) - return false; - - if (otherRecord->_OS != _OS && ![otherRecord->_OS isEqual: _OS]) +- (bool)isEqual: (id)object +{ + OFHINFODNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFHINFODNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_CPU != _CPU && ![record->_CPU isEqual: _CPU]) + return false; + + if (record->_OS != _OS && ![record->_OS isEqual: _OS]) return false; return true; } @@ -574,33 +585,36 @@ [_mailExchange release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFMXDNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFMXDNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_preference != _preference) - return false; - - if (otherRecord->_mailExchange != _mailExchange && - ![otherRecord->_mailExchange isEqual: _mailExchange]) +- (bool)isEqual: (id)object +{ + OFMXDNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFMXDNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_preference != _preference) + return false; + + if (record->_mailExchange != _mailExchange && + ![record->_mailExchange isEqual: _mailExchange]) return false; return true; } @@ -675,30 +689,33 @@ [_authoritativeHost release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFNSDNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFNSDNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_authoritativeHost != _authoritativeHost && - ![otherRecord->_authoritativeHost isEqual: _authoritativeHost]) +- (bool)isEqual: (id)object +{ + OFNSDNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFNSDNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_authoritativeHost != _authoritativeHost && + ![record->_authoritativeHost isEqual: _authoritativeHost]) return false; return true; } @@ -770,30 +787,33 @@ [_domainName release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFPTRDNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFPTRDNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_domainName != _domainName && - ![otherRecord->_domainName isEqual: _domainName]) +- (bool)isEqual: (id)object +{ + OFPTRDNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFPTRDNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_domainName != _domainName && + ![record->_domainName isEqual: _domainName]) return false; return true; } @@ -868,34 +888,37 @@ [_TXTDomainName release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFRPDNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFRPDNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_mailbox != _mailbox && - ![otherRecord->_mailbox isEqual: _mailbox]) - return false; - - if (otherRecord->_TXTDomainName != _TXTDomainName && - ![otherRecord->_TXTDomainName isEqual: _TXTDomainName]) +- (bool)isEqual: (id)object +{ + OFRPDNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFRPDNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_mailbox != _mailbox && + ![record->_mailbox isEqual: _mailbox]) + return false; + + if (record->_TXTDomainName != _TXTDomainName && + ![record->_TXTDomainName isEqual: _TXTDomainName]) return false; return true; } @@ -986,49 +1009,52 @@ [_responsiblePerson release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFSOADNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFSOADNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_primaryNameServer != _primaryNameServer && - ![otherRecord->_primaryNameServer isEqual: _primaryNameServer]) - return false; - - if (otherRecord->_responsiblePerson != _responsiblePerson && - ![otherRecord->_responsiblePerson isEqual: _responsiblePerson]) - return false; - - if (otherRecord->_serialNumber != _serialNumber) - return false; - - if (otherRecord->_refreshInterval != _refreshInterval) - return false; - - if (otherRecord->_retryInterval != _retryInterval) - return false; - - if (otherRecord->_expirationInterval != _expirationInterval) - return false; - - if (otherRecord->_minTTL != _minTTL) +- (bool)isEqual: (id)object +{ + OFSOADNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFSOADNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_primaryNameServer != _primaryNameServer && + ![record->_primaryNameServer isEqual: _primaryNameServer]) + return false; + + if (record->_responsiblePerson != _responsiblePerson && + ![record->_responsiblePerson isEqual: _responsiblePerson]) + return false; + + if (record->_serialNumber != _serialNumber) + return false; + + if (record->_refreshInterval != _refreshInterval) + return false; + + if (record->_retryInterval != _retryInterval) + return false; + + if (record->_expirationInterval != _expirationInterval) + return false; + + if (record->_minTTL != _minTTL) return false; return true; } @@ -1135,39 +1161,41 @@ [_target release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFSRVDNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFSRVDNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_priority != _priority) - return false; - - if (otherRecord->_weight != _weight) - return false; - - if (otherRecord->_target != _target && - ![otherRecord->_target isEqual: _target]) - return false; - - if (otherRecord->_port != _port) +- (bool)isEqual: (id)object +{ + OFSRVDNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFSRVDNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_priority != _priority) + return false; + + if (record->_weight != _weight) + return false; + + if (record->_target != _target && ![record->_target isEqual: _target]) + return false; + + if (record->_port != _port) return false; return true; } @@ -1246,30 +1274,33 @@ [_textData release]; [super dealloc]; } -- (bool)isEqual: (id)otherObject -{ - OFTXTDNSResourceRecord *otherRecord; - - if (![otherObject isKindOfClass: [OFTXTDNSResourceRecord class]]) - return false; - - otherRecord = otherObject; - - if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) - return false; - - if (otherRecord->_DNSClass != _DNSClass) - return false; - - if (otherRecord->_recordType != _recordType) - return false; - - if (otherRecord->_textData != _textData && - ![otherRecord->_textData isEqual: _textData]) +- (bool)isEqual: (id)object +{ + OFTXTDNSResourceRecord *record; + + if (object == self) + return true; + + if (![object isKindOfClass: [OFTXTDNSResourceRecord class]]) + return false; + + record = object; + + if (record->_name != _name && ![record->_name isEqual: _name]) + return false; + + if (record->_DNSClass != _DNSClass) + return false; + + if (record->_recordType != _recordType) + return false; + + if (record->_textData != _textData && + ![record->_textData isEqual: _textData]) return false; return true; } Index: src/OFDNSResponse.m ================================================================== --- src/OFDNSResponse.m +++ src/OFDNSResponse.m @@ -75,10 +75,13 @@ } - (bool)isEqual: (id)object { OFDNSResponse *response; + + if (object == self) + return true; if (![object isKindOfClass: [OFDNSResponse class]]) return false; response = object; Index: src/OFIntrospection.m ================================================================== --- src/OFIntrospection.m +++ src/OFIntrospection.m @@ -343,11 +343,11 @@ OFProperty *otherProperty; if (object == self) return true; - if ([object isKindOfClass: [OFProperty class]]) + if (![object isKindOfClass: [OFProperty class]]) return false; otherProperty = object; if (![otherProperty->_name isEqual: _name]) Index: src/OFSecureData.m ================================================================== --- src/OFSecureData.m +++ src/OFSecureData.m @@ -543,10 +543,13 @@ - (bool)isEqual: (id)object { OFData *otherData; unsigned char diff; + + if (object == self) + return true; if (![object isKindOfClass: [OFData class]]) return false; otherData = object; Index: src/OFValue.m ================================================================== --- src/OFValue.m +++ src/OFValue.m @@ -166,10 +166,13 @@ - (bool)isEqual: (id)object { const char *objCType; size_t size; void *value, *otherValue; + + if (object == self) + return true; if (![object isKindOfClass: [OFValue class]]) return false; objCType = self.objCType;