Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arne Øslebø
mapi
Commits
cb35e033
Commit
cb35e033
authored
Jan 19, 2006
by
Arne Øslebø
Browse files
fix for newer gcc compilers
git-svn-id:
file:///home/svn/mapi/trunk@334
8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent
6203701d
Changes
1
Hide whitespace changes
Inline
Side-by-side
stdlib/bpffilter.c
View file @
cb35e033
...
...
@@ -50,7 +50,7 @@ static int bpf_init(mapidflib_function_instance_t *instance,
instance
->
internal_data
=
malloc
(
sizeof
(
struct
bpf_filter
));
if
(
pcap_compile
(
pcap
,
&
(
/*
(struct bpf_program
)*/
((
struct
bpf_filter
*
)
instance
->
internal_data
)
->
compiled
),
str
,
1
,
0
))
{
if
(
pcap_compile
(
pcap
,
(
(
struct
bpf_program
*
)
&
((
struct
bpf_filter
*
)
instance
->
internal_data
)
->
compiled
),
str
,
1
,
0
))
{
fprintf
(
stderr
,
"bpf compilation error: %s
\n
str:
\"
%s
\"\n
"
,
pcap_geterr
(
pcap
),
str
);
return
PCAP_BPF_ERR
;
...
...
@@ -71,7 +71,7 @@ static int bpf_process(mapidflib_function_instance_t *instance,
static
int
bpf_cleanup
(
mapidflib_function_instance_t
*
instance
)
{
if
(
instance
->
internal_data
!=
NULL
){
pcap_freecode
(
&
/*
(struct bpf_program
)*/
((
struct
bpf_filter
*
)
instance
->
internal_data
)
->
compiled
);
pcap_freecode
((
struct
bpf_program
*
)
&
((
struct
bpf_filter
*
)
instance
->
internal_data
)
->
compiled
);
free
(
instance
->
internal_data
);
}
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment