1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-18 13:39:02 +00:00

Code cleanup.

Removed unused nse.time_created field.
Use bitfields instead of integers for nse.eof and nse.event_done
Indentation fixes.
This commit is contained in:
henri
2013-04-19 23:21:40 +00:00
parent 13abd4df8a
commit 6d9a68ecb9
3 changed files with 13 additions and 18 deletions

View File

@@ -94,10 +94,10 @@ static int netutils_debugging = 0;
* process and return that maximum value (note -- you better not actually open
* this many -- stdin, stdout, other files opened by libraries you use, etc. all
* count toward this limit. Leave a little slack */
int maximize_fdlimit(void) {
int maximize_fdlimit(void) {
#ifndef WIN32
struct rlimit r;
struct rlimit r;
static int maxfds = -1;
if (maxfds > 0)
@@ -146,12 +146,12 @@ int maximize_fdlimit(void) {
#if HAVE_SYS_UN_H
/* Get the UNIX domain socket path or empty string if the address family != AF_UNIX. */
const char *get_unixsock_path(const struct sockaddr_storage *addr)
{
const char *get_unixsock_path(const struct sockaddr_storage *addr) {
struct sockaddr_un *su = (struct sockaddr_un *)addr;
if (!addr || addr->ss_family != AF_UNIX)
return "";
struct sockaddr_un *su = (struct sockaddr_un *)addr;
return (const char *)su->sun_path;
}
#endif
@@ -160,8 +160,7 @@ const char *get_unixsock_path(const struct sockaddr_storage *addr)
* In case we have support for UNIX domain sockets, function returns
* string containing path to UNIX socket if the address family is AF_UNIX,
* otherwise it returns string containing "<address>:<port>". */
char *get_peeraddr_string(const msiod *iod)
{
char *get_peeraddr_string(const msiod *iod) {
static char buffer[PEER_STR_LEN];
#if HAVE_SYS_UN_H