From: Frantisek Sumsal Date: Tue, 28 Sep 2021 21:08:32 +0000 (+0200) Subject: core: fix the return type for xxx_running_timeout() functions X-Git-Tag: v250-rc1~603 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ecea250d77fc1126e11c0e8cb12977420c979d9f;p=thirdparty%2Fsystemd.git core: fix the return type for xxx_running_timeout() functions otherwise we might return an invalid value, since `usec_t` is 64-bit, whereas `int` might not be. Follow-up to: 5918a93 Fixes: #20872 --- diff --git a/src/core/scope.c b/src/core/scope.c index 8fdba646aa4..74f16233c58 100644 --- a/src/core/scope.c +++ b/src/core/scope.c @@ -52,7 +52,7 @@ static void scope_done(Unit *u) { s->timer_event_source = sd_event_source_disable_unref(s->timer_event_source); } -static int scope_running_timeout(Scope *s) { +static usec_t scope_running_timeout(Scope *s) { usec_t delta = 0; assert(s); diff --git a/src/core/service.c b/src/core/service.c index 68485a241f4..9299813d45e 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -515,7 +515,7 @@ static void service_remove_fd_store(Service *s, const char *name) { } } -static int service_running_timeout(Service *s) { +static usec_t service_running_timeout(Service *s) { usec_t delta = 0; assert(s);