From: Yu Watanabe Date: Tue, 29 Jun 2021 07:07:21 +0000 (+0900) Subject: sd-netlink: make several type systems static X-Git-Tag: v250-rc1~763^2~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b5beb9b0f5d7c65e244e11182db08fe48ae65a20;p=thirdparty%2Fsystemd.git sd-netlink: make several type systems static --- diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c index 80492af0dd5..38ea22bfd98 100644 --- a/src/libsystemd/sd-netlink/netlink-types.c +++ b/src/libsystemd/sd-netlink/netlink-types.c @@ -1098,7 +1098,7 @@ static const NLType rtnl_types[] = { [RTM_GETMDB] = { .type = NETLINK_TYPE_NESTED, .type_system = &rtnl_mdb_type_system, .size = sizeof(struct br_port_msg) }, }; -const NLTypeSystem rtnl_type_system_root = { +static const NLTypeSystem rtnl_type_system_root = { .count = ELEMENTSOF(rtnl_types), .types = rtnl_types, }; @@ -1337,7 +1337,7 @@ static const NLType nfnl_types[] = { [NFNL_SUBSYS_NFTABLES] = { .type = NETLINK_TYPE_NESTED, .type_system = &nfnl_nft_msg_type_system, .size = sizeof(struct nfgenmsg) }, }; -const NLTypeSystem nfnl_type_system_root = { +static const NLTypeSystem nfnl_type_system_root = { .count = ELEMENTSOF(nfnl_types), .types = nfnl_types, }; @@ -1708,7 +1708,7 @@ static const NLType genl_types[] = { }; /* Mainly used when message received */ -const NLTypeSystem genl_type_system_root = { +static const NLTypeSystem genl_type_system_root = { .count = ELEMENTSOF(genl_types), .types = genl_types, }; @@ -1742,7 +1742,7 @@ uint16_t type_system_get_count(const NLTypeSystem *type_system) { return type_system->count; } -const NLTypeSystem *type_system_get_root(int protocol) { +static const NLTypeSystem *type_system_get_root(int protocol) { switch (protocol) { case NETLINK_GENERIC: return &genl_type_system_root; diff --git a/src/libsystemd/sd-netlink/netlink-types.h b/src/libsystemd/sd-netlink/netlink-types.h index 5c292ab2b39..b78ed21a418 100644 --- a/src/libsystemd/sd-netlink/netlink-types.h +++ b/src/libsystemd/sd-netlink/netlink-types.h @@ -42,7 +42,6 @@ size_t type_get_size(const NLType *type); const NLTypeSystem *type_get_type_system(const NLType *type); const NLTypeSystemUnion *type_get_type_system_union(const NLType *type); -const NLTypeSystem* type_system_get_root(int protocol); uint16_t type_system_get_count(const NLTypeSystem *type_system); int type_system_root_get_type(sd_netlink *nl, const NLType **ret, uint16_t type); int type_system_get_type(const NLTypeSystem *type_system, const NLType **ret, uint16_t type);