OSDN Git Service
(root)
/
android-x86
/
external-efivar.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
651cf8a
)
Cast port to 16-bit integer
author
Gabriel Majeri
<gabriel.majeri6@gmail.com>
Sun, 24 Sep 2017 11:59:27 +0000
(14:59 +0300)
committer
Peter Jones
<pjones@redhat.com>
Mon, 25 Sep 2017 15:46:39 +0000
(11:46 -0400)
src/dp-message.c
patch
|
blob
|
history
diff --git
a/src/dp-message.c
b/src/dp-message.c
index
6fe20b4
..
235bc7f
100644
(file)
--- a/
src/dp-message.c
+++ b/
src/dp-message.c
@@
-35,7
+35,7
@@
format_ipv4_addr_helper(char *buf, size_t size, const char *dp_type,
format(buf, size, off, dp_type, "%hhu.%hhu.%hhu.%hhu",
ipaddr[0], ipaddr[1], ipaddr[2], ipaddr[3]);
if (port > 0)
- format(buf, size, off, dp_type, ":%hu", port);
+ format(buf, size, off, dp_type, ":%hu",
(uint16_t)
port);
return off;
}
@@
-102,7
+102,7
@@
format_ipv6_addr_helper(char *buf, size_t size, const char *dp_type,
format(buf, size, off, "dp_type", "]");
if (port >= 0)
- format(buf, size, off, "Ipv6", ":%hu", port);
+ format(buf, size, off, "Ipv6", ":%hu",
(uint16_t)
port);
return off;
}