]> The Tcpdump Group git mirrors - libpcap/commitdiff
Fix warning as "ISO C90 forbids mixed declarations and code"
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 2 Sep 2015 19:40:48 +0000 (21:40 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 2 Sep 2015 19:40:48 +0000 (21:40 +0200)
pcap-bt-linux.c

index ebdf1249128e1e0fcedb0f701c04d274f83cd1d5..1e141757d4fc270295d88e8239de548fbdefdf2a 100644 (file)
@@ -305,6 +305,7 @@ bt_read_linux(pcap_t *handle, int max_packets, pcap_handler callback, u_char *us
        struct pcap_pkthdr pkth;
        pcap_bluetooth_h4_header* bthdr;
        char *pktd;
+       int in = 0;
 
        pktd = (char *)handle->buffer + BT_CTRL_SIZE;
        bthdr = (pcap_bluetooth_h4_header*)(void *)pktd;
@@ -337,7 +338,6 @@ bt_read_linux(pcap_t *handle, int max_packets, pcap_handler callback, u_char *us
 
        /* get direction and timestamp*/
        cmsg = CMSG_FIRSTHDR(&msg);
-       int in=0;
        while (cmsg) {
                switch (cmsg->cmsg_type) {
                        case HCI_CMSG_DIR: