isdigit() returns zero or "non-zero" value, not zero or "one".

This causes building xlxd with gcc makes no problem, but with clang makes
"Read 0 DMR id" message at boot.
pull/122/head
SASANO Takayoshi 7 years ago
parent 6d85e1382b
commit 1958afca33

@ -152,7 +152,10 @@ bool CDmridDir::IsValidDmrid(const char *sz)
ok = true; ok = true;
for ( size_t i = 0; (i < n) && ok; i++ ) for ( size_t i = 0; (i < n) && ok; i++ )
{ {
ok &= ::isdigit(sz[i]); if ( !::isdigit(sz[i]) )
{
ok = false;
}
} }
} }
return ok; return ok;

Loading…
Cancel
Save

Powered by TurnKey Linux.