summaryrefslogtreecommitdiff
path: root/src/cidr.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2014-02-10 20:08:56 +0000
committerPeter Powell <petpow@saberuk.com>2014-02-11 08:20:01 +0000
commit7fec670c9b378f5c8470204ba36a284a424a11c7 (patch)
tree722c076a747b8d3c61689f669155c9dbcb528c74 /src/cidr.cpp
parentd481bf8eb1a2c2dcf27e58c82420e3f35b7670eb (diff)
Fix various problems detected by Clang 3.4.
- cidr.cpp: remove inverted_bits; unused since 9fad3ecb9215a0034bf407f192926b04cb5efaed. - cmd_stats.cpp: remove needless inversion and comparison to 0. - inspircd.cpp: remove needless comparison to 0. - socket.cpp: remove all_zero; unused since 03a1bf15b1da7643b237c22db1a478916a976ccf.
Diffstat (limited to 'src/cidr.cpp')
-rw-r--r--src/cidr.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/cidr.cpp b/src/cidr.cpp
index 54f7b83e9..050a3549d 100644
--- a/src/cidr.cpp
+++ b/src/cidr.cpp
@@ -23,25 +23,7 @@
#include "inspircd.h"
-/* Used when comparing CIDR masks for the modulus bits left over.
- * A lot of ircd's seem to do this:
- * ((-1) << (8 - (mask % 8)))
- * But imho, it sucks in comparison to a nice neat lookup table.
- */
-const unsigned char inverted_bits[8] = { 0x00, /* 00000000 - 0 bits - never actually used */
- 0x80, /* 10000000 - 1 bits */
- 0xC0, /* 11000000 - 2 bits */
- 0xE0, /* 11100000 - 3 bits */
- 0xF0, /* 11110000 - 4 bits */
- 0xF8, /* 11111000 - 5 bits */
- 0xFC, /* 11111100 - 6 bits */
- 0xFE /* 11111110 - 7 bits */
-};
-
-
/* Match CIDR strings, e.g. 127.0.0.1 to 127.0.0.0/8 or 3ffe:1:5:6::8 to 3ffe:1::0/32
- * If you have a lot of hosts to match, youre probably better off building your mask once
- * and then using the lower level MatchCIDRBits directly.
*
* This will also attempt to match any leading usernames or nicknames on the mask, using
* match(), when match_with_username is true.