mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 17:59:04 +00:00
Minor style fixes.
This commit is contained in:
@@ -464,7 +464,7 @@ int nsi_getlastcommunicationinfo(nsock_iod ms_iod, int *protocol, int *af, struc
|
||||
memset(local, 0, socklen);
|
||||
ret = 0;
|
||||
} else {
|
||||
assert(slen > 0 );
|
||||
assert(slen > 0);
|
||||
memcpy(local, &sock, MIN((unsigned)slen, socklen));
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -178,7 +178,7 @@ void update_first_events(msevent *nse) {
|
||||
* it is the one which created it), in which case 0 can be passed to skip the
|
||||
* step. This function returns zero if the event is not found, nonzero
|
||||
* otherwise. */
|
||||
int nsock_event_cancel(nsock_pool ms_pool, nsock_event_id id, int notify ) {
|
||||
int nsock_event_cancel(nsock_pool ms_pool, nsock_event_id id, int notify) {
|
||||
mspool *nsp = (mspool *)ms_pool;
|
||||
enum nse_type type;
|
||||
gh_list *event_list = NULL, *event_list2 = NULL;
|
||||
@@ -371,8 +371,8 @@ nsock_event_id get_new_event_id(mspool *ms, enum nse_type type) {
|
||||
assert(type < NSE_TYPE_MAX);
|
||||
|
||||
shiftbits = sizeof(nsock_event_id) * 8 - TYPE_CODE_NUM_BITS;
|
||||
max_serial_allowed = ( 1 << shiftbits ) - 1;
|
||||
if (serial == max_serial_allowed ) {
|
||||
max_serial_allowed = (1 << shiftbits) - 1;
|
||||
if (serial == max_serial_allowed) {
|
||||
/* then the next serial will be one because 0 is forbidden */
|
||||
ms->next_event_serial = 1;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ char* nsock_pcap_open(nsock_pool nsp, nsock_iod nsiod, const char *pcap_device,
|
||||
|
||||
failed = 0;
|
||||
do {
|
||||
mp->pt = pcap_open_live((char* )pcap_device, snaplen, promisc, to_ms, err0r);
|
||||
mp->pt = pcap_open_live((char *)pcap_device, snaplen, promisc, to_ms, err0r);
|
||||
if (mp->pt) /* okay, opened!*/
|
||||
break;
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ nsock_event_id nsock_write(nsock_pool ms_pool, nsock_iod ms_iod,
|
||||
|
||||
/* Same as nsock_write except you can use a printf-style format and you can only use this for ASCII strings */
|
||||
nsock_event_id nsock_printf(nsock_pool ms_pool, nsock_iod ms_iod,
|
||||
nsock_ev_handler handler, int timeout_msecs, void *userdata, char *format, ... ) {
|
||||
nsock_ev_handler handler, int timeout_msecs, void *userdata, char *format, ...) {
|
||||
mspool *nsp = (mspool *)ms_pool;
|
||||
msiod *nsi = (msiod *)ms_iod;
|
||||
msevent *nse;
|
||||
|
||||
Reference in New Issue
Block a user