]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hostname: use proper type
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 23 May 2025 14:19:40 +0000 (23:19 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 23 May 2025 14:19:40 +0000 (23:19 +0900)
src/hostname/hostnamed.c

index 245126ff927f1b6d21327f7a8a84099d355179e3..ec09acb539dd6a095215ad889587a8f72b73175f 100644 (file)
@@ -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]));