mirror of
https://github.com/nmap/nmap.git
synced 2025-12-19 14:09:02 +00:00
Minor style fixes
This commit is contained in:
@@ -66,7 +66,6 @@
|
|||||||
|
|
||||||
/* Assumes space for fs has already been allocated */
|
/* Assumes space for fs has already been allocated */
|
||||||
int filespace_init(struct filespace *fs, int initial_size) {
|
int filespace_init(struct filespace *fs, int initial_size) {
|
||||||
|
|
||||||
memset(fs, 0, sizeof(struct filespace));
|
memset(fs, 0, sizeof(struct filespace));
|
||||||
if (initial_size == 0)
|
if (initial_size == 0)
|
||||||
initial_size = FS_INITSIZE_DEFAULT;
|
initial_size = FS_INITSIZE_DEFAULT;
|
||||||
@@ -95,11 +94,6 @@ int fs_cat(struct filespace *fs, const char *str, int len) {
|
|||||||
if (len == 0)
|
if (len == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/*
|
|
||||||
printf("fscat: current_alloc=%d; current_size=%d; len=%d\n",
|
|
||||||
fs->current_alloc, fs->current_size, len);
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (fs->current_alloc - fs->current_size < len + 2) {
|
if (fs->current_alloc - fs->current_size < len + 2) {
|
||||||
char *tmpstr;
|
char *tmpstr;
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,8 @@
|
|||||||
* NSE_STATUS_SUCCESS will be returned in the case of EOF or tiemout if at least
|
* NSE_STATUS_SUCCESS will be returned in the case of EOF or tiemout if at least
|
||||||
* 1 char has been read. Also note that you may get more than 'nlines' back --
|
* 1 char has been read. Also note that you may get more than 'nlines' back --
|
||||||
* we just stop once "at least" 'nlines' is read */
|
* we just stop once "at least" 'nlines' is read */
|
||||||
nsock_event_id nsock_readlines(nsock_pool nsp, nsock_iod ms_iod, nsock_ev_handler handler, int timeout_msecs,
|
nsock_event_id nsock_readlines(nsock_pool nsp, nsock_iod ms_iod,
|
||||||
|
nsock_ev_handler handler, int timeout_msecs,
|
||||||
void *userdata, int nlines) {
|
void *userdata, int nlines) {
|
||||||
msiod *nsi = (msiod *)ms_iod;
|
msiod *nsi = (msiod *)ms_iod;
|
||||||
mspool *ms = (mspool *)nsp;
|
mspool *ms = (mspool *)nsp;
|
||||||
@@ -87,7 +88,8 @@ nsock_event_id nsock_readlines(nsock_pool nsp, nsock_iod ms_iod, nsock_ev_handle
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Same as above, except it tries to read at least 'nbytes' instead of 'nlines'. */
|
/* Same as above, except it tries to read at least 'nbytes' instead of 'nlines'. */
|
||||||
nsock_event_id nsock_readbytes(nsock_pool nsp, nsock_iod ms_iod, nsock_ev_handler handler, int timeout_msecs,
|
nsock_event_id nsock_readbytes(nsock_pool nsp, nsock_iod ms_iod,
|
||||||
|
nsock_ev_handler handler, int timeout_msecs,
|
||||||
void *userdata, int nbytes) {
|
void *userdata, int nbytes) {
|
||||||
|
|
||||||
msiod *nsi = (msiod *)ms_iod;
|
msiod *nsi = (msiod *)ms_iod;
|
||||||
@@ -111,7 +113,9 @@ nsock_event_id nsock_readbytes(nsock_pool nsp, nsock_iod ms_iod, nsock_ev_handle
|
|||||||
|
|
||||||
/* The simplest read function -- returns NSE_STATUS_SUCCESS when it
|
/* The simplest read function -- returns NSE_STATUS_SUCCESS when it
|
||||||
* reads anything, otherwise it returns timeout, eof, or error as appropriate */
|
* reads anything, otherwise it returns timeout, eof, or error as appropriate */
|
||||||
nsock_event_id nsock_read(nsock_pool nsp, nsock_iod ms_iod, nsock_ev_handler handler, int timeout_msecs, void *userdata) {
|
nsock_event_id nsock_read(nsock_pool nsp, nsock_iod ms_iod,
|
||||||
|
nsock_ev_handler handler, int timeout_msecs,
|
||||||
|
void *userdata) {
|
||||||
msiod *nsi = (msiod *)ms_iod;
|
msiod *nsi = (msiod *)ms_iod;
|
||||||
mspool *ms = (mspool *)nsp;
|
mspool *ms = (mspool *)nsp;
|
||||||
msevent *nse;
|
msevent *nse;
|
||||||
|
|||||||
Reference in New Issue
Block a user