Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
6d99bd57
Commit
6d99bd57
authored
May 31, 2015
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove C99-isms.
parent
1ba29b3e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
5 deletions
+7
-5
babeld.c
babeld.c
+1
-2
disambiguation.c
disambiguation.c
+2
-1
kernel_netlink.c
kernel_netlink.c
+3
-1
util.h
util.h
+1
-1
No files found.
babeld.c
View file @
6d99bd57
...
...
@@ -843,12 +843,11 @@ main(int argc, char **argv)
static
int
accept_local_connections
(
fd_set
*
readfds
)
{
int
rc
;
int
rc
,
s
;
if
(
local_server_socket
<
0
||
!
FD_ISSET
(
local_server_socket
,
readfds
))
return
0
;
int
s
;
s
=
accept
(
local_server_socket
,
NULL
,
NULL
);
if
(
s
<
0
)
{
...
...
disambiguation.c
View file @
6d99bd57
...
...
@@ -65,9 +65,10 @@ rt_cmp(const struct babel_route *rt1, const struct babel_route *rt2)
static
const
struct
babel_route
*
min_route
(
const
struct
babel_route
*
r1
,
const
struct
babel_route
*
r2
)
{
int
rc
;
if
(
!
r1
)
return
r2
;
if
(
!
r2
)
return
r1
;
int
rc
=
rt_cmp
(
r1
,
r2
);
rc
=
rt_cmp
(
r1
,
r2
);
return
rc
<=
0
?
r1
:
r2
;
}
...
...
kernel_netlink.c
View file @
6d99bd57
...
...
@@ -1093,6 +1093,8 @@ parse_kernel_route_rta(struct rtmsg *rtm, int len, struct kernel_route *route)
{
int
table
=
rtm
->
rtm_table
;
struct
rtattr
*
rta
=
RTM_RTA
(
rtm
);;
int
i
;
len
-=
NLMSG_ALIGN
(
sizeof
(
*
rtm
));
memset
(
route
,
0
,
sizeof
(
struct
kernel_route
));
...
...
@@ -1147,10 +1149,10 @@ parse_kernel_route_rta(struct rtmsg *rtm, int len, struct kernel_route *route)
#undef COPY_ADDR
#undef GET_PLEN
int
i
;
for
(
i
=
0
;
i
<
import_table_count
;
i
++
)
if
(
table
==
import_tables
[
i
])
return
0
;
return
-
1
;
}
...
...
util.h
View file @
6d99bd57
...
...
@@ -117,7 +117,7 @@ enum prefix_status {
PST_DISJOINT
=
1
<<
0
,
PST_EQUALS
=
1
<<
1
,
PST_MORE_SPECIFIC
=
1
<<
2
,
PST_LESS_SPECIFIC
=
1
<<
3
,
PST_LESS_SPECIFIC
=
1
<<
3
};
enum
prefix_status
prefix_cmp
(
const
unsigned
char
*
p1
,
unsigned
char
plen1
,
...
...
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