summaryrefslogtreecommitdiffstats
path: root/src/shared/ip-protocol-list.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-12-02 05:58:18 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-12-02 05:58:18 +0100
commitcedfe0b02b3cab6281106a6f4e090336b3ca487f (patch)
tree4e8f7b8cb8c128c9d56951aad56594b564edab6b /src/shared/ip-protocol-list.c
parentutil: rename socket_protocol_{from,to}_name() to ip_protocol_{from,to}_name() (diff)
downloadsystemd-cedfe0b02b3cab6281106a6f4e090336b3ca487f.tar.xz
systemd-cedfe0b02b3cab6281106a6f4e090336b3ca487f.zip
util: cast smaller type to large type
Diffstat (limited to 'src/shared/ip-protocol-list.c')
-rw-r--r--src/shared/ip-protocol-list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/ip-protocol-list.c b/src/shared/ip-protocol-list.c
index 9a1c11b0d8..775cd3313d 100644
--- a/src/shared/ip-protocol-list.c
+++ b/src/shared/ip-protocol-list.c
@@ -17,7 +17,7 @@ const char *ip_protocol_to_name(int id) {
if (id < 0)
return NULL;
- if (id >= (int) ELEMENTSOF(ip_protocol_names))
+ if ((size_t) id >= ELEMENTSOF(ip_protocol_names))
return NULL;
return ip_protocol_names[id];