1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-19 20:59:01 +00:00

A bunch of standardization changes to nmap-os-fingerprints from Steve Martin

This commit is contained in:
fyodor
2005-08-25 20:08:11 +00:00
parent 30c5bec9a4
commit 9e78d26845
3 changed files with 252 additions and 247 deletions

View File

@@ -1169,7 +1169,7 @@ ServiceProbe *AllProbes::getProbeByName(const char *name, int proto) {
// scan protocols.
int AllProbes::isExcluded(unsigned short port, int proto) {
unsigned short *p=NULL;
int count=-1;
int count=-1,i;
if (proto == IPPROTO_TCP) {
p = excludedports->tcp_ports;
@@ -1181,8 +1181,9 @@ int AllProbes::isExcluded(unsigned short port, int proto) {
fatal("Bad proto number (%d) specified in AllProbes::isExcluded", proto);
}
for (;count >= 0;count--)
if (p[count] == port) return 1;
for (i=0; i<count; i++)
if (p[i] == port)
return 1;
return 0;
}