From 71f86bf2ecfbbb7e82a4e3486beac7732c483277 Mon Sep 17 00:00:00 2001 From: dmiller Date: Wed, 19 Apr 2017 02:17:20 +0000 Subject: [PATCH] Remove some unused function prototypes --- nmap.cc | 22 +++++++++++----------- nmap.h | 7 ------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/nmap.cc b/nmap.cc index aafa69e35..8328d6c2e 100644 --- a/nmap.cc +++ b/nmap.cc @@ -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 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: diff --git a/nmap.h b/nmap.h index 8db592312..13347b58b 100644 --- a/nmap.h +++ b/nmap.h @@ -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 */