Skip to content

Commit

Permalink
Add newlines at the EOF in conformance to Daniel's coding standards
Browse files Browse the repository at this point in the history
proposal. This only affects Nmap's root directory. We might also need to
modify the code which autogenerates Nmap's source code files such as IPv6
fingerprinting code.
  • Loading branch information
d33tah committed Jun 18, 2014
1 parent e69325c commit e3d1c17
Show file tree
Hide file tree
Showing 66 changed files with 66 additions and 0 deletions.
1 change: 1 addition & 0 deletions FPEngine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2691,3 +2691,4 @@ void response_reception_handler_wrapper(nsock_pool nsp, nsock_event nse, void *a
global_netctl.response_reception_handler(nsp, nse, arg);
return;
}

1 change: 1 addition & 0 deletions FPEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,3 +471,4 @@ std::vector<FingerMatch> load_fp_matches();


#endif /* __FPENGINE_H__ */

1 change: 1 addition & 0 deletions FPModel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3337,3 +3337,4 @@ std::vector<FingerMatch> load_fp_matches() {
}
return matches;
}

1 change: 1 addition & 0 deletions FingerPrintResults.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,4 @@ class FingerPrintResultsIPv6 : public FingerPrintResults {
};

#endif /* FINGERPRINTRESULTS_H */

1 change: 1 addition & 0 deletions MACLookup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,4 @@ bool MACCorp2Prefix(const char *vendorstr, u8 *mac_data) {
}
return false;
}

1 change: 1 addition & 0 deletions MACLookup.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,4 @@ const char *MACPrefix2Corp(const u8 *prefix);
bool MACCorp2Prefix(const char *vendorstr, u8 *mac_data);

#endif /* MACLOOKUP_H */

1 change: 1 addition & 0 deletions NmapOps.cc
Original file line number Diff line number Diff line change
Expand Up @@ -688,3 +688,4 @@ void NmapOps::chooseScripts(char* argument) {
}
}
#endif

1 change: 1 addition & 0 deletions NmapOutputTable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -319,3 +319,4 @@ char *NmapOutputTable::printableTable(int *size) {
if (size) *size = p;
return tableout;
}

1 change: 1 addition & 0 deletions Target.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,3 +375,4 @@ class Target {
};

#endif /* TARGET_H */

1 change: 1 addition & 0 deletions TargetGroup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -785,3 +785,4 @@ unsigned long NewTargets::insert (const char *target) {

return new_targets->push(target);
}

1 change: 1 addition & 0 deletions TargetGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,4 @@ class NewTargets {
};

#endif /* TARGETGROUP_H */

1 change: 1 addition & 0 deletions charpool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,4 @@ int modulus;

return cp_strdup(src);
}

1 change: 1 addition & 0 deletions charpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,4 @@ char *cp_strdup(const char *src);
void cp_free(void);

#endif

1 change: 1 addition & 0 deletions global_structures.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,3 +342,4 @@ struct scan_lists {
typedef enum { STYPE_UNKNOWN, HOST_DISCOVERY, ACK_SCAN, SYN_SCAN, FIN_SCAN, XMAS_SCAN, UDP_SCAN, CONNECT_SCAN, NULL_SCAN, WINDOW_SCAN, SCTP_INIT_SCAN, SCTP_COOKIE_ECHO_SCAN, MAIMON_SCAN, IPPROT_SCAN, PING_SCAN, PING_SCAN_ARP, IDLE_SCAN, BOUNCE_SCAN, SERVICE_SCAN, OS_SCAN, SCRIPT_PRE_SCAN, SCRIPT_SCAN, SCRIPT_POST_SCAN, TRACEROUTE, PING_SCAN_ND }stype;

#endif /*GLOBAL_STRUCTURES_H */

1 change: 1 addition & 0 deletions idle_scan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1460,3 +1460,4 @@ void idle_scan(Target *target, u16 *portarray, int numports,
target->stopTimeOutClock(NULL);
return;
}

1 change: 1 addition & 0 deletions idle_scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,4 @@ void idle_scan(Target *target, u16 *portarray, int numports,
char *proxy, const struct scan_lists *ports);

#endif /* IDLE_SCAN_H */

1 change: 1 addition & 0 deletions main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,4 @@ int main(int argc, char *argv[]) {

return nmap_main(argc, argv);
}

1 change: 1 addition & 0 deletions nmap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3131,3 +3131,4 @@ static void display_nmap_version() {
log_write(LOG_STDOUT, "\n");
log_write(LOG_STDOUT, "Available nsock engines: %s\n", nsock_list_engines());
}

1 change: 1 addition & 0 deletions nmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -459,3 +459,4 @@ int nmap_fileexistsandisreadable(const char* pathname);
int gather_logfile_resumption_state(char *fname, int *myargc, char ***myargv);

#endif /* NMAP_H */

1 change: 1 addition & 0 deletions nmap_amigaos.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,4 @@ struct addrinfo {
};

#endif /* _NMAP_AMIGAOS_H_ */

1 change: 1 addition & 0 deletions nmap_dns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1389,3 +1389,4 @@ std::list<std::string> get_dns_servers() {
}
return serverList;
}

1 change: 1 addition & 0 deletions nmap_dns.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,4 @@ void nmap_mass_rdns(Target ** targets, int num_targets);
const char *lookup_cached_host(u32 ip);

std::list<std::string> get_dns_servers();

1 change: 1 addition & 0 deletions nmap_error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,4 @@ void gh_perror(const char *fmt, ...) {
fflush(stderr);
return;
}

1 change: 1 addition & 0 deletions nmap_ftp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,4 @@ void bounce_scan(Target *target, u16 *portarray, int numports,
numports, (long) time(NULL) - starttime);
return;
}

1 change: 1 addition & 0 deletions nmap_ftp.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,4 @@ void bounce_scan(Target *target, u16 *portarray, int numports,
struct ftpinfo *ftp);

#endif /* NMAP_FTP_H */

1 change: 1 addition & 0 deletions nmap_tty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -374,3 +374,4 @@ bool keyWasPressed()

return false;
}

1 change: 1 addition & 0 deletions nmap_winconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,4 @@
#define PCRE_INCLUDED 1

#endif /* NMAP_WINCONFIG_H */

1 change: 1 addition & 0 deletions nse_binlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
LUALIB_API int luaopen_binlib (lua_State *L);

#endif /* NSE_BINLIB */

1 change: 1 addition & 0 deletions nse_bit.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
LUALIB_API int luaopen_bit(lua_State *L);

#endif

1 change: 1 addition & 0 deletions nse_debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,4 @@ void lua_state_dump (lua_State *L)

assert(lua_gettop(L) == top);
}

1 change: 1 addition & 0 deletions nse_dnet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -366,3 +366,4 @@ LUALIB_API int luaopen_dnet (lua_State *L)

return 1;
}

1 change: 1 addition & 0 deletions nse_dnet.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
LUALIB_API int luaopen_dnet (lua_State *L);

#endif

1 change: 1 addition & 0 deletions nse_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
LUALIB_API int luaopen_lfs (lua_State *L);

#endif

1 change: 1 addition & 0 deletions nse_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -816,3 +816,4 @@ void close_nse (void)
L_NSE = NULL;
}
}

1 change: 1 addition & 0 deletions nse_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ void close_nse (void);
#define SCRIPT_ENGINE_EXTENSION ".nse"

#endif

1 change: 1 addition & 0 deletions nse_nmaplib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -972,3 +972,4 @@ int luaopen_nmap (lua_State *L)

return 1;
}

1 change: 1 addition & 0 deletions nse_nsock.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1102,3 +1102,4 @@ LUALIB_API int luaopen_nsock (lua_State *L)

return 1;
}

1 change: 1 addition & 0 deletions nse_nsock.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
LUALIB_API int luaopen_nsock (lua_State *);

#endif

1 change: 1 addition & 0 deletions nse_openssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
LUALIB_API int luaopen_openssl(lua_State *L);

#endif

1 change: 1 addition & 0 deletions nse_ssl_cert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -530,3 +530,4 @@ void nse_nsock_init_ssl_cert(lua_State *L)
lua_setfield(L, -2, "__index");
ssl_cert_methods_index_ref = luaL_ref(L, LUA_REGISTRYINDEX);
}

1 change: 1 addition & 0 deletions nse_ssl_cert.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@

int l_get_ssl_certificate(lua_State *L);
void nse_nsock_init_ssl_cert(lua_State *L);

1 change: 1 addition & 0 deletions nse_utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,4 @@ Port *nseU_getport (lua_State *L, Target *target, Port *port, int idx)
lua_pop(L, 2);
return p;
}

1 change: 1 addition & 0 deletions nse_utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,4 @@ Target *nseU_gettarget (lua_State *L, int idx);
Port *nseU_getport (lua_State *L, Target *target, Port *port, int idx);

#endif

1 change: 1 addition & 0 deletions osscan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1301,3 +1301,4 @@ FingerPrintDB *parse_fingerprint_reference_file(const char *dbname) {

return parse_fingerprint_file(filename);
}

1 change: 1 addition & 0 deletions osscan2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3726,3 +3726,4 @@ int OSScan::os_scan(std::vector<Target *> &Targets) {
else
return OP_FAILURE;
}

1 change: 1 addition & 0 deletions output.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,4 @@ void nmap_adjust_loglevel(nsock_pool nsp, bool trace);
void nmap_nsock_stderr_logger(nsock_pool nsp, const struct nsock_log_rec *rec);

#endif /* OUTPUT_H */

1 change: 1 addition & 0 deletions payload.cc
Original file line number Diff line number Diff line change
Expand Up @@ -419,3 +419,4 @@ const char *get_udp_payload(u16 dport, size_t *length) {
return udp_port2payload(dport, length);
}
}

1 change: 1 addition & 0 deletions payload.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,4 @@ const char *udp_port2payload(u16 dport, size_t *length);
int init_payloads(void);

#endif /* PAYLOAD_H */

1 change: 1 addition & 0 deletions portlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,4 @@ class PortList {
};

#endif

1 change: 1 addition & 0 deletions portreasons.cc
Original file line number Diff line number Diff line change
Expand Up @@ -562,3 +562,4 @@ char *port_reason_str(state_reason_t r) {
}
return reason;
}

1 change: 1 addition & 0 deletions protocols.cc
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,4 @@ struct protoent *nmap_getprotbynum(int num) {
/* Couldn't find it ... oh well. */
return NULL;
}

1 change: 1 addition & 0 deletions protocols.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,4 @@ struct protoent *nmap_getprotbynum(int num);
"N/A")

#endif

1 change: 1 addition & 0 deletions scan_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5864,3 +5864,4 @@ void ultra_scan(std::vector<Target *> &Targets, struct scan_lists *ports,
if (o.debugging > 2 && USI.pd != NULL)
pcap_print_stats(LOG_PLAIN, USI.pd);
}

1 change: 1 addition & 0 deletions scan_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,4 @@ int determineScanGroupSize(int hosts_scanned_so_far,
struct scan_lists *ports);

#endif /* SCAN_ENGINE_H */

1 change: 1 addition & 0 deletions services.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,4 @@ void gettoppts(double level, char *portlist, struct scan_lists * ports);
void free_services();

#endif

1 change: 1 addition & 0 deletions struct_ip.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,4 @@ struct icmp
#define icmp_data icmp_dun.id_data
};
#endif /* HAVE_STRUCT_ICMP */

1 change: 1 addition & 0 deletions targets.cc
Original file line number Diff line number Diff line change
Expand Up @@ -721,3 +721,4 @@ Target *nexthost(HostGroupState *hs, const addrset *exclude_group,

return hs->hostbatch[hs->next_batch_no++];
}

1 change: 1 addition & 0 deletions targets.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,4 @@ int dumpExclude(addrset *exclude_group);
void returnhost(HostGroupState *hs);

#endif /* TARGETS_H */

1 change: 1 addition & 0 deletions tcpip.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2170,3 +2170,4 @@ int gettcpopt_ts(struct tcp_hdr *tcp, u32 *timestamp, u32 *echots) {
*echots = 0;
return 0;
}

1 change: 1 addition & 0 deletions timing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -774,3 +774,4 @@ bool ScanProgressMeter::beginOrEndTask(const struct timeval *now, const char *ad
log_flush(LOG_STDOUT|LOG_XML);
return true;
}

1 change: 1 addition & 0 deletions traceroute.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1649,3 +1649,4 @@ static struct timeval get_now(struct timeval *now) {
static const char *ss_to_string(const struct sockaddr_storage *ss) {
return inet_ntop_ez(ss, sizeof(*ss));
}

1 change: 1 addition & 0 deletions traceroute.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,4 @@
int traceroute(std::vector<Target *> &Targets);

void traceroute_hop_cache_clear();

1 change: 1 addition & 0 deletions utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -700,3 +700,4 @@ int win32_munmap(char *filestr, int filelen) {
return 0;
}
#endif

1 change: 1 addition & 0 deletions utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,4 @@ int win32_munmap(char *filestr, int filelen);
#endif /* WIN32 */

#endif /* UTILS_H */

1 change: 1 addition & 0 deletions xml.cc
Original file line number Diff line number Diff line change
Expand Up @@ -452,3 +452,4 @@ bool xml_tag_open() {
bool xml_root_written() {
return xml.root_written;
}

1 change: 1 addition & 0 deletions xml.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,4 @@ bool xml_tag_open();
bool xml_root_written();

#endif

0 comments on commit e3d1c17

Please sign in to comment.