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
09e6236a
Commit
09e6236a
authored
Oct 24, 2018
by
Antonin Décimo
Committed by
Juliusz Chroboczek
Oct 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use %u when printing an unsigned int.
parent
0ae3988f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
12 deletions
+12
-12
babeld.c
babeld.c
+1
-1
interface.c
interface.c
+7
-7
kernel_socket.c
kernel_socket.c
+1
-1
local.c
local.c
+2
-2
util.c
util.c
+1
-1
No files found.
babeld.c
View file @
09e6236a
...
...
@@ -1122,7 +1122,7 @@ dump_tables(FILE *out)
FOR_ALL_NEIGHBOURS
(
neigh
)
{
fprintf
(
out
,
"Neighbour %s dev %s reach %04x ureach %04x "
"rxcost %
d txcost %d rtt %s rttcost %d
chan %d%s.
\n
"
,
"rxcost %
u txcost %d rtt %s rttcost %u
chan %d%s.
\n
"
,
format_address
(
neigh
->
address
),
neigh
->
ifp
->
name
,
neigh
->
hello
.
reach
,
...
...
interface.c
View file @
09e6236a
...
...
@@ -295,7 +295,7 @@ interface_up(struct interface *ifp, int up)
rc
=
kernel_setup_interface
(
1
,
ifp
->
name
,
ifp
->
ifindex
);
if
(
rc
<
0
)
{
fprintf
(
stderr
,
"kernel_setup_interface(%s, %
d
) failed.
\n
"
,
fprintf
(
stderr
,
"kernel_setup_interface(%s, %
u
) failed.
\n
"
,
ifp
->
name
,
ifp
->
ifindex
);
goto
fail
;
}
...
...
@@ -308,7 +308,7 @@ interface_up(struct interface *ifp, int up)
mtu
=
kernel_interface_mtu
(
ifp
->
name
,
ifp
->
ifindex
);
if
(
mtu
<
0
)
{
fprintf
(
stderr
,
"Warning: couldn't get MTU of interface %s (%
d
).
\n
"
,
fprintf
(
stderr
,
"Warning: couldn't get MTU of interface %s (%
u
).
\n
"
,
ifp
->
name
,
ifp
->
ifindex
);
mtu
=
1280
;
}
...
...
@@ -318,7 +318,7 @@ interface_up(struct interface *ifp, int up)
/* In IPv6, the minimum MTU is 1280, and every host must be able
to reassemble up to 1500 bytes, but I'd rather not rely on this. */
if
(
mtu
<
128
)
{
fprintf
(
stderr
,
"Suspiciously low MTU %d on interface %s (%
d
).
\n
"
,
fprintf
(
stderr
,
"Suspiciously low MTU %d on interface %s (%
u
).
\n
"
,
mtu
,
ifp
->
name
,
ifp
->
ifindex
);
mtu
=
128
;
}
...
...
@@ -338,7 +338,7 @@ interface_up(struct interface *ifp, int up)
rc
=
resize_receive_buffer
(
mtu
);
if
(
rc
<
0
)
fprintf
(
stderr
,
"Warning: couldn't resize "
"receive buffer for interface %s (%
d
) (%d bytes).
\n
"
,
"receive buffer for interface %s (%
u
) (%d bytes).
\n
"
,
ifp
->
name
,
ifp
->
ifindex
,
mtu
);
type
=
IF_CONF
(
ifp
,
type
);
...
...
@@ -349,7 +349,7 @@ interface_up(struct interface *ifp, int up)
rc
=
kernel_interface_wireless
(
ifp
->
name
,
ifp
->
ifindex
);
if
(
rc
<
0
)
{
fprintf
(
stderr
,
"Warning: couldn't determine whether %s (%
d
) "
"Warning: couldn't determine whether %s (%
u
) "
"is a wireless interface.
\n
"
,
ifp
->
name
,
ifp
->
ifindex
);
}
else
if
(
rc
)
{
...
...
@@ -422,8 +422,8 @@ interface_up(struct interface *ifp, int up)
IF_CONF
(
ifp
,
rtt_max
)
:
120000
;
if
(
ifp
->
rtt_max
<=
ifp
->
rtt_min
)
{
fprintf
(
stderr
,
"Uh, rtt-max is less than or equal to rtt-min (%
d <= %d
). "
"Setting it to %
d
.
\n
"
,
ifp
->
rtt_max
,
ifp
->
rtt_min
,
"Uh, rtt-max is less than or equal to rtt-min (%
u <= %u
). "
"Setting it to %
u
.
\n
"
,
ifp
->
rtt_max
,
ifp
->
rtt_min
,
ifp
->
rtt_min
+
10000
);
ifp
->
rtt_max
=
ifp
->
rtt_min
+
10000
;
}
...
...
kernel_socket.c
View file @
09e6236a
...
...
@@ -588,7 +588,7 @@ print_kernel_route(int add, struct kernel_route *route)
memcpy
(
ifname
,
"unk"
,
4
);
fprintf
(
stderr
,
"%s kernel route: dest: %s gw: %s metric: %d if: %s(%
d
)
\n
"
,
"%s kernel route: dest: %s gw: %s metric: %d if: %s(%
u
)
\n
"
,
add
==
RTM_ADD
?
"Add"
:
add
==
RTM_DELETE
?
"Delete"
:
"Change"
,
format_prefix
(
route
->
prefix
,
route
->
plen
),
...
...
local.c
View file @
09e6236a
...
...
@@ -145,7 +145,7 @@ local_notify_neighbour_1(struct local_socket *s,
rttbuf
[
0
]
=
'\0'
;
if
(
valid_rtt
(
neigh
))
{
rc
=
snprintf
(
rttbuf
,
64
,
" rtt %s rttcost %
d
"
,
rc
=
snprintf
(
rttbuf
,
64
,
" rtt %s rttcost %
u
"
,
format_thousands
(
neigh
->
rtt
),
neighbour_rttcost
(
neigh
));
if
(
rc
<
0
||
rc
>=
64
)
rttbuf
[
0
]
=
'\0'
;
...
...
@@ -154,7 +154,7 @@ local_notify_neighbour_1(struct local_socket *s,
rc
=
snprintf
(
buf
,
512
,
"%s neighbour %lx address %s "
"if %s reach %04x ureach %04x "
"rxcost %
d txcost %d%s cost %d
\n
"
,
"rxcost %
u txcost %u%s cost %u
\n
"
,
local_kind
(
kind
),
/* Neighbours never move around in memory , so we can use the
address as a unique identifier. */
...
...
util.c
View file @
09e6236a
...
...
@@ -302,7 +302,7 @@ format_thousands(unsigned int value)
static
char
buf
[
4
][
15
];
static
int
i
=
0
;
i
=
(
i
+
1
)
%
4
;
snprintf
(
buf
[
i
],
15
,
"%
d.%.3d
"
,
value
/
1000
,
value
%
1000
);
snprintf
(
buf
[
i
],
15
,
"%
u.%.3u
"
,
value
/
1000
,
value
%
1000
);
return
buf
[
i
];
}
...
...
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