From 2af3cad0cd4fa520572b02cdcc8758d14a49ea3c Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 23 May 2025 23:19:40 +0900 Subject: [PATCH] hostname: use proper type --- src/hostname/hostnamed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index 245126ff927..ec09acb539d 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -101,7 +101,7 @@ typedef struct Context { static void context_reset(Context *c, uint64_t mask) { assert(c); - for (int p = 0; p < _PROP_MAX; p++) { + for (HostProperty p = 0; p < _PROP_MAX; p++) { if (!BIT_SET(mask, p)) continue; @@ -845,7 +845,7 @@ static int context_write_data_machine_info(Context *c) { if (r < 0 && r != -ENOENT) return r; - for (int p = PROP_PRETTY_HOSTNAME; p <= PROP_LOCATION; p++) { + for (HostProperty p = PROP_PRETTY_HOSTNAME; p <= PROP_LOCATION; p++) { assert(name[p]); r = strv_env_assign(&l, name[p], empty_to_null(c->data[p])); -- 2.47.3