From fda09318e36113a050d52687ff26f9b97487e349 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 20 Aug 2018 10:43:31 +0200 Subject: [PATCH] core: rename function to better reflect semantics --- src/core/unit.c | 8 ++++---- src/core/unit.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/unit.c b/src/core/unit.c index 172624a547b..6ca8f6a97f9 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -438,7 +438,7 @@ void unit_add_to_dbus_queue(Unit *u) { u->in_dbus_queue = true; } -void unit_add_to_stop_when_unneeded_queue(Unit *u) { +void unit_submit_to_stop_when_unneeded_queue(Unit *u) { assert(u); if (u->in_stop_when_unneeded_queue) @@ -1994,7 +1994,7 @@ bool unit_is_unneeded(Unit *u) { Iterator i; void *v; - /* If a dependending unit has a job queued, or is active (or in transitioning), or is marked for + /* If a dependent unit has a job queued, is active or transitioning, or is marked for * restart, then don't clean this one up. */ HASHMAP_FOREACH_KEY(v, other, u->dependencies[deps[j]], i) { @@ -2032,7 +2032,7 @@ static void check_unneeded_dependencies(Unit *u) { void *v; HASHMAP_FOREACH_KEY(v, other, u->dependencies[deps[j]], i) - unit_add_to_stop_when_unneeded_queue(other); + unit_submit_to_stop_when_unneeded_queue(other); } } @@ -2495,7 +2495,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, UnitNotifyFlag if (!MANAGER_IS_RELOADING(u->manager)) { /* Maybe we finished startup and are now ready for being stopped because unneeded? */ - unit_add_to_stop_when_unneeded_queue(u); + unit_submit_to_stop_when_unneeded_queue(u); /* Maybe we finished startup, but something we needed has vanished? Let's die then. (This happens when * something BindsTo= to a Type=oneshot unit, as these units go directly from starting to inactive, diff --git a/src/core/unit.h b/src/core/unit.h index e14cfb81733..3770c01acde 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -617,7 +617,7 @@ void unit_add_to_dbus_queue(Unit *u); void unit_add_to_cleanup_queue(Unit *u); void unit_add_to_gc_queue(Unit *u); void unit_add_to_target_deps_queue(Unit *u); -void unit_add_to_stop_when_unneeded_queue(Unit *u); +void unit_submit_to_stop_when_unneeded_queue(Unit *u); int unit_merge(Unit *u, Unit *other); int unit_merge_by_name(Unit *u, const char *other); -- 2.47.3