]> The Tcpdump Group git mirrors - libpcap/commitdiff
Cleaning spaces
authorFrancois-Xavier Le Bail <[email protected]>
Fri, 8 Nov 2019 15:59:41 +0000 (16:59 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Fri, 8 Nov 2019 15:59:41 +0000 (16:59 +0100)
[skip ci]

optimize.c
pcap-common.c
pcap-dlpi.c
pcap-linux.c
pcap-npf.c

index e38d2d7c4e28c78a2d11a58964582bf221efe889..49ea88522f994dfc90f185b8bde553928f1791ee 100644 (file)
@@ -991,10 +991,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) {
@@ -2401,7 +2401,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);
                    }
@@ -2421,7 +2421,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);
                    }
index 3fb4086e0f0c010e2065a5431a2a17e69c46a17c..06a41a29e6b3e967f2ff37819e82601b73edfdc2 100644 (file)
@@ -1215,7 +1215,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 },
 
        /*
index 948199a8bef2c7c97885b7d29bf2fcefb75a995a..c43c1b1593a8142481253084d9ff6a96b7372107 100644 (file)
@@ -633,7 +633,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 */
@@ -761,7 +761,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;
        }
 
index 0d3ba2ab7d7ab4f0d540a542229a508b9526bd2e..928c08c586c13040123d7d6d2f0d42acd13a9859 100644 (file)
@@ -3451,9 +3451,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.
@@ -3661,7 +3661,7 @@ activate_sock(pcap_t *handle, int is_any_device)
 
                if ((err = iface_bind(sock_fd, handlep->ifindex,
                    handle->errbuf, pcap_protocol(handle))) != 0) {
-                       close(sock_fd);
+                       close(sock_fd);
                        return err;
                }
        } else {
index 11fbaee1ccb4b7afcdf2f7a16665824968e7eaff..dd72b8d9e6e248a271d96124ce9718830587ec09 100644 (file)
@@ -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) {
                snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
-                               "Error setting dump limit");
+                               "Error setting dump limit");
                return (-1);
        }
 
@@ -1128,8 +1128,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)
                {