summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2019-11-08 16:59:41 +0100
committerGuy Harris <guy@alum.mit.edu>2019-11-09 19:03:05 -0800
commitcb47e29250c358a315e5061e4083eae5146c6ab3 (patch)
tree09b34cec30477033b63c8e870ef237f5430aea96
parent02079f6cb53d9c198ac3d4c51e50e64d9caa063a (diff)
downloadlibpcap-cb47e29250c358a315e5061e4083eae5146c6ab3.tar.gz
Cleaning spaces
[skip ci] (cherry picked from commit b880df9ac467c6be1f14c94f97418e6848a5c9e5)
-rw-r--r--optimize.c12
-rw-r--r--pcap-common.c2
-rw-r--r--pcap-dlpi.c4
-rw-r--r--pcap-linux.c8
-rw-r--r--pcap-npf.c6
5 files changed, 16 insertions, 16 deletions
diff --git a/optimize.c b/optimize.c
index 2553f0bc..77c1a8c9 100644
--- a/optimize.c
+++ b/optimize.c
@@ -965,10 +965,10 @@ opt_peep(opt_state_t *opt_state, struct block *b)
*/
if (b->s.code == (BPF_JMP|BPF_JEQ|BPF_K) &&
!ATOMELEM(b->out_use, A_ATOM)) {
- /*
- * We can optimize away certain subtractions of the
- * X register.
- */
+ /*
+ * We can optimize away certain subtractions of the
+ * X register.
+ */
if (last->s.code == (BPF_ALU|BPF_SUB|BPF_X)) {
val = b->val[X_ATOM];
if (opt_state->vmap[val].is_const) {
@@ -2379,7 +2379,7 @@ filled:
if (off >= 256) {
/* offset too large for branch, must add a jump */
if (p->longjt == 0) {
- /* mark this instruction and retry */
+ /* mark this instruction and retry */
p->longjt++;
return(0);
}
@@ -2399,7 +2399,7 @@ filled:
if (off >= 256) {
/* offset too large for branch, must add a jump */
if (p->longjf == 0) {
- /* mark this instruction and retry */
+ /* mark this instruction and retry */
p->longjf++;
return(0);
}
diff --git a/pcap-common.c b/pcap-common.c
index 2a745f0b..10af9d69 100644
--- a/pcap-common.c
+++ b/pcap-common.c
@@ -1144,7 +1144,7 @@ static struct linktype_map {
{ DLT_ARCNET, LINKTYPE_ARCNET_BSD },
{ DLT_SLIP, LINKTYPE_SLIP },
{ DLT_PPP, LINKTYPE_PPP },
- { DLT_FDDI, LINKTYPE_FDDI },
+ { DLT_FDDI, LINKTYPE_FDDI },
{ DLT_SYMANTEC_FIREWALL, LINKTYPE_SYMANTEC_FIREWALL },
/*
diff --git a/pcap-dlpi.c b/pcap-dlpi.c
index 3ed8fa7a..3e794c27 100644
--- a/pcap-dlpi.c
+++ b/pcap-dlpi.c
@@ -639,7 +639,7 @@ pcap_activate_dlpi(pcap_t *p)
**/
if (dlbindreq(p->fd, 0, p->errbuf) < 0 ||
dlbindack(p->fd, (char *)buf, p->errbuf, NULL) < 0) {
- status = PCAP_ERROR;
+ status = PCAP_ERROR;
goto bad;
}
#endif /* AIX vs. HP-UX vs. other */
@@ -767,7 +767,7 @@ pcap_activate_dlpi(pcap_t *p)
*/
if (dlinforeq(p->fd, p->errbuf) < 0 ||
dlinfoack(p->fd, (char *)buf, p->errbuf) < 0) {
- status = PCAP_ERROR;
+ status = PCAP_ERROR;
goto bad;
}
diff --git a/pcap-linux.c b/pcap-linux.c
index 2d3ab067..a7f69362 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -3570,9 +3570,9 @@ set_dlt_list_cooked(pcap_t *handle, int sock_fd)
len = sizeof(tp_reserve);
if (getsockopt(sock_fd, SOL_PACKET, PACKET_RESERVE, &tp_reserve,
&len) == 0) {
- /*
- * Yes, we can do DLL_LINUX_SLL2.
- */
+ /*
+ * Yes, we can do DLL_LINUX_SLL2.
+ */
handle->dlt_list = (u_int *) malloc(sizeof(u_int) * 2);
/*
* If that fails, just leave the list empty.
@@ -3813,7 +3813,7 @@ activate_new(pcap_t *handle)
if ((err = iface_bind(sock_fd, handlep->ifindex,
handle->errbuf, protocol)) != 1) {
- close(sock_fd);
+ close(sock_fd);
if (err < 0)
return err;
else
diff --git a/pcap-npf.c b/pcap-npf.c
index f995e57d..c4435ebd 100644
--- a/pcap-npf.c
+++ b/pcap-npf.c
@@ -459,7 +459,7 @@ pcap_live_dump_npf(pcap_t *p, char *filename, int maxsize, int maxpacks)
res = PacketSetDumpLimits(pw->adapter, maxsize, maxpacks);
if(res == FALSE) {
pcap_snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
- "Error setting dump limit");
+ "Error setting dump limit");
return (-1);
}
@@ -1118,8 +1118,8 @@ pcap_activate_npf(pcap_t *p)
* If the buffer size wasn't explicitly set, default to
* WIN32_DEFAULT_KERNEL_BUFFER_SIZE.
*/
- if (p->opt.buffer_size == 0)
- p->opt.buffer_size = WIN32_DEFAULT_KERNEL_BUFFER_SIZE;
+ if (p->opt.buffer_size == 0)
+ p->opt.buffer_size = WIN32_DEFAULT_KERNEL_BUFFER_SIZE;
if(PacketSetBuff(pw->adapter,p->opt.buffer_size)==FALSE)
{