1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

network/tclass: make tclass_drop() static

This also drops unused constant return value.
This commit is contained in:
Yu Watanabe 2024-09-02 13:22:41 +09:00
parent 4a31c768a9
commit 3d7f26d9f2
2 changed files with 2 additions and 5 deletions

View File

@ -359,7 +359,7 @@ void link_tclass_drop_marked(Link *link) {
} }
} }
TClass* tclass_drop(TClass *tclass) { static void tclass_drop(TClass *tclass) {
assert(tclass); assert(tclass);
tclass_mark_recursive(tclass); tclass_mark_recursive(tclass);
@ -367,8 +367,6 @@ TClass* tclass_drop(TClass *tclass) {
/* link_tclass_drop_marked() may invalidate tclass, so run link_qdisc_drop_marked() first. */ /* link_tclass_drop_marked() may invalidate tclass, so run link_qdisc_drop_marked() first. */
link_qdisc_drop_marked(tclass->link); link_qdisc_drop_marked(tclass->link);
link_tclass_drop_marked(tclass->link); link_tclass_drop_marked(tclass->link);
return NULL;
} }
static int tclass_handler(sd_netlink *rtnl, sd_netlink_message *m, Request *req, Link *link, TClass *tclass) { static int tclass_handler(sd_netlink *rtnl, sd_netlink_message *m, Request *req, Link *link, TClass *tclass) {
@ -584,7 +582,7 @@ int manager_rtnl_process_tclass(sd_netlink *rtnl, sd_netlink_message *message, M
case RTM_DELTCLASS: case RTM_DELTCLASS:
if (tclass) if (tclass)
(void) tclass_drop(tclass); tclass_drop(tclass);
else else
log_tclass_debug(tmp, link, "Kernel removed unknown"); log_tclass_debug(tmp, link, "Kernel removed unknown");

View File

@ -62,7 +62,6 @@ TClass* tclass_unref(TClass *tclass);
int tclass_new_static(TClassKind kind, Network *network, const char *filename, unsigned section_line, TClass **ret); int tclass_new_static(TClassKind kind, Network *network, const char *filename, unsigned section_line, TClass **ret);
void tclass_mark_recursive(TClass *tclass); void tclass_mark_recursive(TClass *tclass);
TClass* tclass_drop(TClass *tclass);
void link_tclass_drop_marked(Link *link); void link_tclass_drop_marked(Link *link);
int link_find_tclass(Link *link, uint32_t classid, TClass **ret); int link_find_tclass(Link *link, uint32_t classid, TClass **ret);