From: Yu Watanabe Date: Fri, 23 May 2025 14:19:40 +0000 (+0900) Subject: hostname: use proper type X-Git-Tag: v258-rc1~509^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2af3cad0cd4fa520572b02cdcc8758d14a49ea3c;p=thirdparty%2Fsystemd.git hostname: use proper type --- 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]));