From: Mike Yuan Date: Wed, 15 May 2024 13:52:47 +0000 (+0800) Subject: core/swap: rename variable 'new' -> 'new_unit' X-Git-Tag: v256-rc3~71^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb33c5da87d2e6e5f24d99dd51910cf42125bf1a;p=thirdparty%2Fsystemd.git core/swap: rename variable 'new' -> 'new_unit' Follow-up for ba31a5018f99864c22dd4e0f10712456c7abc934 'new' is already used as a macro for memory allocation. Let's avoid the confusion here. Addresses https://github.com/systemd/systemd/pull/31902#discussion_r1557672858 --- diff --git a/src/core/swap.c b/src/core/swap.c index 222241c9da2..c4d2ba8f3ac 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -374,7 +374,7 @@ static int swap_setup_unit( int priority, bool set_flags) { - _cleanup_(unit_freep) Unit *new = NULL; + _cleanup_(unit_freep) Unit *new_unit = NULL; _cleanup_free_ char *e = NULL; Unit *u; Swap *s; @@ -398,11 +398,11 @@ static int swap_setup_unit( "Swap appeared twice with different device paths %s and %s, refusing.", s->parameters_proc_swaps.what, what_proc_swaps); } else { - r = unit_new_for_name(m, sizeof(Swap), e, &new); + r = unit_new_for_name(m, sizeof(Swap), e, &new_unit); if (r < 0) return log_warning_errno(r, "Failed to load swap unit '%s': %m", e); - u = new; + u = new_unit; s = ASSERT_PTR(SWAP(u)); s->what = strdup(what); @@ -438,7 +438,7 @@ static int swap_setup_unit( p->priority_set = true; unit_add_to_dbus_queue(u); - TAKE_PTR(new); + TAKE_PTR(new_unit); return 0; }