mirror of
https://github.com/vel21ripn/nDPI.git
synced 2026-05-02 00:40:17 +00:00
Firxed warnings
This commit is contained in:
parent
8a4c15ecf5
commit
d427647ce7
1 changed files with 3 additions and 3 deletions
|
|
@ -1044,14 +1044,14 @@ static pcap_t * openPcapFileOrDevice(u_int16_t thread_id, const u_char * pcap_fi
|
|||
pcap_t * pcap_handle = NULL;
|
||||
|
||||
/* trying to open a live interface */
|
||||
if((pcap_handle = pcap_open_live(pcap_file, snaplen, promisc, 500, pcap_error_buffer)) == NULL) {
|
||||
if((pcap_handle = pcap_open_live((char*)pcap_file, snaplen, promisc, 500, pcap_error_buffer)) == NULL) {
|
||||
capture_for = capture_until = 0;
|
||||
|
||||
live_capture = 0;
|
||||
num_threads = 1; /* Open pcap files in single threads mode */
|
||||
|
||||
/* trying to open a pcap file */
|
||||
if((pcap_handle = pcap_open_offline(pcap_file, pcap_error_buffer)) == NULL) {
|
||||
if((pcap_handle = pcap_open_offline((char*)pcap_file, pcap_error_buffer)) == NULL) {
|
||||
char filename[256];
|
||||
|
||||
/* trying to open a pcap playlist */
|
||||
|
|
@ -1197,7 +1197,7 @@ void test_lib() {
|
|||
#endif
|
||||
|
||||
for(thread_id = 0; thread_id < num_threads; thread_id++) {
|
||||
pcap_t * cap = openPcapFileOrDevice(thread_id, _pcap_file[thread_id]);
|
||||
pcap_t * cap = openPcapFileOrDevice(thread_id, (const u_char*)_pcap_file[thread_id]);
|
||||
setupDetection(thread_id, cap);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue