From 6d5aa57e6d893e15a77e85490c0f1a761c30924e Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Mon, 27 Jun 2022 21:56:43 +0200 Subject: Deprecate memset(3) for zero-init --- src/unit/src/unit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/unit') diff --git a/src/unit/src/unit.c b/src/unit/src/unit.c index 8d208a1..f25d406 100644 --- a/src/unit/src/unit.c +++ b/src/unit/src/unit.c @@ -133,7 +133,7 @@ static void unit_stop(struct unit *const u) static void target_reset(struct unit *const u) { - memset(&u->target, 0, sizeof u->target); + u->target = (const struct unit_target){0}; u->state = UNIT_STATE_IDLE_MOVING; unit_stop(u); } -- cgit v1.2.3