diff --git a/nsock/src/nsock_connect.c b/nsock/src/nsock_connect.c index 9b7c58115..c1befb3ca 100644 --- a/nsock/src/nsock_connect.c +++ b/nsock/src/nsock_connect.c @@ -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 { diff --git a/nsock/src/nsock_event.c b/nsock/src/nsock_event.c index cfa455699..322bddc25 100644 --- a/nsock/src/nsock_event.c +++ b/nsock/src/nsock_event.c @@ -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; } diff --git a/nsock/src/nsock_pcap.c b/nsock/src/nsock_pcap.c index 252646a4c..84086d2a2 100644 --- a/nsock/src/nsock_pcap.c +++ b/nsock/src/nsock_pcap.c @@ -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; diff --git a/nsock/src/nsock_write.c b/nsock/src/nsock_write.c index 590b0326d..eb806d4d4 100644 --- a/nsock/src/nsock_write.c +++ b/nsock/src/nsock_write.c @@ -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;