diff options
author | Sadie Powell <sadie@witchery.services> | 2021-11-30 10:54:10 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2021-11-30 11:04:19 +0000 |
commit | 754c82d047b80c30ff2f775d32e8b9b054049ebd (patch) | |
tree | eb1abbc79af82320c34805c8282914609476a973 /src/regchannel.cpp | |
parent | 17fa704278a99aeac4e59df1bf58e63d88357788 (diff) |
Remove undefined behaviour around checking if this is null.
Diffstat (limited to 'src/regchannel.cpp')
-rw-r--r-- | src/regchannel.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp index bd6fcbbf0..ffdf55bce 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -629,8 +629,7 @@ void ChannelInfo::ClearLevels() Anope::string ChannelInfo::GetIdealBan(User *u) const { - int bt = this ? this->bantype : -1; - switch (bt) + switch (this->bantype) { case 0: return "*!" + u->GetVIdent() + "@" + u->GetDisplayedHost(); |