mirror of
https://github.com/nmap/nmap.git
synced 2026-01-03 13:19:04 +00:00
Update libpcap to 1.7.3, partially addressing #34
This commit is contained in:
@@ -24,8 +24,6 @@
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
/* $Id: pcap-sita.c */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
@@ -185,7 +183,7 @@ static int read_client_nbytes(int fd, int count, unsigned char *buf) {
|
||||
find_unit_by_fd(fd, &chassis, &geoslot, &u);
|
||||
while (count) {
|
||||
if ((len = recv(fd, buf, count, 0)) <= 0) return -1; /* read in whatever data was sent to us */
|
||||
count -= len;
|
||||
count -= len;
|
||||
buf += len;
|
||||
} /* till we have everything we are looking for */
|
||||
return 0;
|
||||
@@ -213,7 +211,7 @@ static void empty_unit(int chassis, int geoslot) {
|
||||
u->imsg = (char *)realloc(u->imsg, 1); /* and re-allocate the old large buffer into a new small one */
|
||||
if (u->imsg == NULL) { /* oops, realloc call failed */
|
||||
fprintf(stderr, "Warning...call to realloc() failed, value of errno is %d\n", errno);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -555,10 +553,10 @@ static void sort_if_table(void) {
|
||||
}
|
||||
if (has_swapped == 0)
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static int process_client_data (char *errbuf) { /* returns: -1 = error, 0 = OK */
|
||||
int chassis, geoslot;
|
||||
unit_t *u;
|
||||
|
||||
Reference in New Issue
Block a user