Merge pull request #152 from prokrypt/patch-4
spectrum: don't check blacklistFreqs if unset
This commit is contained in:
@@ -671,9 +671,10 @@ static void Blacklist() {
|
|||||||
#ifdef ENABLE_SCAN_RANGES
|
#ifdef ENABLE_SCAN_RANGES
|
||||||
static bool IsBlacklisted(uint16_t idx)
|
static bool IsBlacklisted(uint16_t idx)
|
||||||
{
|
{
|
||||||
for(uint8_t i = 0; i < ARRAY_SIZE(blacklistFreqs); i++)
|
if(blacklistedFreqs[0]) // cheaper than checking blacklistFreqsIdx
|
||||||
if(blacklistFreqs[i] == idx)
|
for(uint8_t i = 0; i < ARRAY_SIZE(blacklistFreqs); i++)
|
||||||
return true;
|
if(blacklistFreqs[i] == idx)
|
||||||
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user