diff options
| author | 2011-04-18 16:58:35 -0400 | |
|---|---|---|
| committer | 2011-04-18 16:58:35 -0400 | |
| commit | 8c30dfc6e77b84348e30024646db614e92177b1b (patch) | |
| tree | 375cd103149db984eb0d3365863bfc23bb078784 /src/socket.cpp | |
| parent | Clarify the error if a user starts a registrant list with an account other th... (diff) | |
Fix mis-implemented irc::sockets::cidr_mask::operator<
Diffstat (limited to 'src/socket.cpp')
| -rw-r--r-- | src/socket.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/socket.cpp b/src/socket.cpp index 403161ca8..3aea05e93 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -329,8 +329,11 @@ bool irc::sockets::cidr_mask::operator==(const cidr_mask& other) const bool irc::sockets::cidr_mask::operator<(const cidr_mask& other) const { - return type < other.type || length < other.length || - memcmp(bits, other.bits, 16) < 0; + if (type != other.type) + return type < other.type; + if (length != other.length) + return length < other.length; + return memcmp(bits, other.bits, 16) < 0; } bool irc::sockets::cidr_mask::match(const irc::sockets::sockaddrs& addr) const |
