]> The Tcpdump Group git mirrors - libpcap/commitdiff
Fix warnings as "C++ style comments are not allowed in ISO C90"
authorFrancois-Xavier Le Bail <[email protected]>
Sat, 5 Sep 2015 16:24:40 +0000 (18:24 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Sat, 5 Sep 2015 16:24:40 +0000 (18:24 +0200)
pcap-canusb-linux.c
pcap-dbus.c
pcap-linux.c
pcap/pcap.h

index dc57c99b1d956a36db5b7be325c505ba23e109c3..4c51d63dfdf7859f74c372670f854a2efa7b7051 100644 (file)
@@ -108,16 +108,16 @@ int canusb_findalldevs(pcap_if_t **alldevsp, char *err_str)
     for(i=0;i<cnt;i++)
     {
         int ret;
-        // Check if this device is interesting.
+        /* Check if this device is interesting. */
         struct libusb_device_descriptor desc;
         libusb_device_handle *dh;
 
         libusb_get_device_descriptor(devs[i],&desc);
 
         if ((desc.idVendor != CANUSB_VID) || (desc.idProduct != CANUSB_PID))
-            continue; //It is not, check next device
+            continue; /* It is not, check next device */
 
-        //It is!
+        /* It is! */
         dh = NULL;
 
         if ((ret = libusb_open(devs[i],&dh)) == 0)
@@ -156,7 +156,7 @@ static libusb_device_handle* canusb_opendevice(struct libusb_context *ctx, char*
 
     for(i=0;i<cnt;i++)
     {
-        // Check if this device is interesting.
+        /* Check if this device is interesting. */
         struct libusb_device_descriptor desc;
         libusb_device_handle *dh;
 
@@ -165,7 +165,7 @@ static libusb_device_handle* canusb_opendevice(struct libusb_context *ctx, char*
         if ((desc.idVendor != CANUSB_VID) || (desc.idProduct != CANUSB_PID))
           continue;
 
-        //Found one!
+        /* Found one! */
         dh = NULL;
 
         if (libusb_open(devs[i],&dh) != 0) continue;
@@ -197,7 +197,7 @@ static libusb_device_handle* canusb_opendevice(struct libusb_context *ctx, char*
             continue;
         }
 
-        //Fount it!
+        /* Fount it! */
         libusb_free_device_list(devs,1);
         return dh;
     }
@@ -276,7 +276,7 @@ static void* canusb_capture_thread(void *arg)
         struct CAN_Msg msg;
 
         libusb_interrupt_transfer(canusb->dev, 0x81, (unsigned char*)&status, sizeof(status), &sz, 100);
-        //HACK!!!!! -> drop buffered data, read new one by reading twice.
+        /* HACK!!!!! -> drop buffered data, read new one by reading twice. */
         libusb_interrupt_transfer(canusb->dev, 0x81, (unsigned char*)&status, sizeof(status), &sz, 100);
 
         for(i = 0; i<status.rxsz; i++)
@@ -312,9 +312,9 @@ static void canusb_clearbufs(struct pcap_canusb* this)
     unsigned char cmd[16];
     int al;
 
-    cmd[0] = 1;  //Empty incoming buffer
-    cmd[1] = 1;  //Empty outgoing buffer
-    cmd[3] = 0;  //Not a write to serial number
+    cmd[0] = 1;  /* Empty incoming buffer */
+    cmd[1] = 1;  /* Empty outgoing buffer */
+    cmd[3] = 0;  /* Not a write to serial number */
     memset(&cmd[4],0,16-4);
 
     libusb_interrupt_transfer(this->dev, 0x1,cmd,16,&al,100);
index ab3f12581efaed876d20ddd633a2f26a99c1623f..09672f249bd5e4aa28ed7f4555468eeb0f1e38d0 100644 (file)
@@ -66,7 +66,7 @@ dbus_read(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user)
        message = dbus_connection_pop_message(handlep->conn);
 
        while (!message) {
-               // XXX handle->opt.timeout = timeout_ms;
+               /* XXX handle->opt.timeout = timeout_ms; */
                if (!dbus_connection_read_write(handlep->conn, 100)) {
                        snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Connection closed");
                        return -1;
index 572eafbda48d00ea6ff7c764baa5d08e71422409..13d79ff056c4e04f71ffb5d662bc4c5ad4d59698 100644 (file)
@@ -3195,7 +3195,7 @@ static void map_arphrd_to_dlt(pcap_t *handle, int sock_fd, int arptype,
                 * so let's use "Linux-cooked" mode. Jean II
                 *
                 * XXX - this is handled in activate_new(). */
-               //handlep->cooked = 1;
+               /* handlep->cooked = 1; */
                break;
 
        /* ARPHRD_LAPD is unofficial and randomly allocated, if reallocation
@@ -3238,7 +3238,7 @@ static void map_arphrd_to_dlt(pcap_t *handle, int sock_fd, int arptype,
                 *
                 * XXX - this is handled in activate_new().
                 */
-               //handlep->cooked = 1;
+               /* handlep->cooked = 1; */
                break;
 
        default:
index 0008cb0ba83a1117a1321e6af813d6363a880128..ed0f24127447ec46dfabf0b382151de025df887c 100644 (file)
@@ -451,9 +451,10 @@ void       bpf_dump(const struct bpf_program *, int);
 */
 struct pcap_send_queue
 {
-       u_int maxlen;   ///< Maximum size of the the queue, in bytes. This variable contains the size of the buffer field.
-       u_int len;      ///< Current size of the queue, in bytes.
-       char *buffer;   ///< Buffer containing the packets to be sent.
+       u_int maxlen;   /* Maximum size of the the queue, in bytes. This
+                          variable contains the size of the buffer field. */
+       u_int len;      /* Current size of the queue, in bytes. */
+       char *buffer;   /* Buffer containing the packets to be sent. */
 };
 
 typedef struct pcap_send_queue pcap_send_queue;