1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-01 03:40:16 +02:00

Use correct boolen operator on IPv4 addresses

This commit is contained in:
Uwe L. Korn
2014-08-31 16:10:06 +01:00
parent 3e5fcd7e08
commit 07851d7eda

View File

@@ -1384,9 +1384,9 @@ Servent::isIPWhitelisted( QHostAddress ip )
{
// Convert to a real IPv4 address and rerun checks
quint32 ipv4 = (static_cast<quint32>(ipv6[12]) << 24)
& (static_cast<quint32>(ipv6[13]) << 16)
& (static_cast<quint32>(ipv6[14]) << 8)
& static_cast<quint32>(ipv6[15]);
| (static_cast<quint32>(ipv6[13]) << 16)
| (static_cast<quint32>(ipv6[14]) << 8)
| static_cast<quint32>(ipv6[15]);
QHostAddress addr( ipv4 );
return isIPWhitelisted( addr );
}