1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-20 21:29:06 +00:00

Remove some unused function prototypes

This commit is contained in:
dmiller
2017-04-19 02:17:20 +00:00
parent 214d527632
commit 71f86bf2ec
2 changed files with 11 additions and 18 deletions

22
nmap.cc
View File

@@ -1761,6 +1761,17 @@ void apply_delayed_options() {
}
}
// Free some global memory allocations.
// This is used for detecting memory leaks.
void nmap_free_mem() {
PortList::freePortMap();
cp_free();
free_services();
AllProbes::service_scan_free();
traceroute_hop_cache_clear();
nsock_set_default_engine(NULL);
}
int nmap_main(int argc, char *argv[]) {
int i;
std::vector<Target *> Targets;
@@ -2288,17 +2299,6 @@ int nmap_main(int argc, char *argv[]) {
return 0;
}
// Free some global memory allocations.
// This is used for detecting memory leaks.
void nmap_free_mem() {
PortList::freePortMap();
cp_free();
free_services();
AllProbes::service_scan_free();
traceroute_hop_cache_clear();
nsock_set_default_engine(NULL);
}
/* Reads in a (normal or machine format) Nmap log file and gathers enough
state to allow Nmap to continue where it left off. The important things
it must gather are:

7
nmap.h
View File

@@ -374,9 +374,6 @@ typedef enum { STYPE_UNKNOWN, HOST_DISCOVERY, ACK_SCAN, SYN_SCAN, FIN_SCAN, XMAS
/***********************PROTOTYPES**********************************/
/* print Interactive usage information */
void printinteractiveusage();
/* port manipulators */
void getpts(const char *expr, struct scan_lists * ports); /* someone stole the name getports()! */
void getpts_simple(const char *origexpr, int range_type,
@@ -387,15 +384,11 @@ void free_scan_lists(struct scan_lists *ports);
/* Renamed main so that interactive mode could preprocess when necessary */
int nmap_main(int argc, char *argv[]);
void nmap_free_mem();
/* general helper functions */
const char *statenum2str(int state);
const char *scantype2str(stype scantype);
void reaper(int signo);
int nmap_fetchfile(char *filename_returned, int bufferlen, const char *file);
int nmap_fileexistsandisreadable(const char* pathname);
int gather_logfile_resumption_state(char *fname, int *myargc, char ***myargv);
#endif /* NMAP_H */