]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/test/test-install-root.c
tree-wide: be more careful with the type of array sizes
[thirdparty/systemd.git] / src / test / test-install-root.c
index 24eda9c44f54de27e1e0ae13f3254e43e15f73f0..194e483294598706a1b69da200d3cb3ae2b744fc 100644 (file)
@@ -17,7 +17,7 @@ static void test_basic_mask_and_enable(const char *root) {
         const char *p;
         UnitFileState state;
         UnitFileChange *changes = NULL;
-        unsigned n_changes = 0;
+        size_t n_changes = 0;
 
         log_set_max_level(LOG_DEBUG);
 
@@ -158,7 +158,7 @@ static void test_linked_units(const char *root) {
         const char *p, *q;
         UnitFileState state;
         UnitFileChange *changes = NULL;
-        unsigned n_changes = 0, i;
+        size_t n_changes = 0, i;
 
         /*
          * We'll test three cases here:
@@ -303,7 +303,7 @@ static void test_linked_units(const char *root) {
 static void test_default(const char *root) {
         _cleanup_free_ char *def = NULL;
         UnitFileChange *changes = NULL;
-        unsigned n_changes = 0;
+        size_t n_changes = 0;
         const char *p;
 
         p = strjoina(root, "/usr/lib/systemd/system/test-default-real.target");
@@ -338,7 +338,7 @@ static void test_default(const char *root) {
 
 static void test_add_dependency(const char *root) {
         UnitFileChange *changes = NULL;
-        unsigned n_changes = 0;
+        size_t n_changes = 0;
         const char *p;
 
         p = strjoina(root, "/usr/lib/systemd/system/real-add-dependency-test-target.target");
@@ -365,7 +365,7 @@ static void test_add_dependency(const char *root) {
 
 static void test_template_enable(const char *root) {
         UnitFileChange *changes = NULL;
-        unsigned n_changes = 0;
+        size_t n_changes = 0;
         UnitFileState state;
         const char *p;
 
@@ -479,7 +479,7 @@ static void test_template_enable(const char *root) {
 
 static void test_indirect(const char *root) {
         UnitFileChange *changes = NULL;
-        unsigned n_changes = 0;
+        size_t n_changes = 0;
         UnitFileState state;
         const char *p;
 
@@ -528,7 +528,7 @@ static void test_indirect(const char *root) {
 
 static void test_preset_and_list(const char *root) {
         UnitFileChange *changes = NULL;
-        unsigned n_changes = 0, i;
+        size_t n_changes = 0, i;
         const char *p, *q;
         UnitFileState state;
         bool got_yes = false, got_no = false;
@@ -638,7 +638,7 @@ static void test_revert(const char *root) {
         const char *p;
         UnitFileState state;
         UnitFileChange *changes = NULL;
-        unsigned n_changes = 0;
+        size_t n_changes = 0;
 
         assert(root);
 
@@ -687,7 +687,7 @@ static void test_revert(const char *root) {
 
 static void test_preset_order(const char *root) {
         UnitFileChange *changes = NULL;
-        unsigned n_changes = 0;
+        size_t n_changes = 0;
         const char *p;
         UnitFileState state;
 
@@ -758,7 +758,7 @@ static void test_with_dropin(const char *root) {
         const char *p;
         UnitFileState state;
         UnitFileChange *changes = NULL;
-        unsigned n_changes = 0;
+        size_t n_changes = 0;
 
         assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "with-dropin-1.service", &state) == -ENOENT);
         assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "with-dropin-2.service", &state) == -ENOENT);
@@ -891,7 +891,7 @@ static void test_with_dropin_template(const char *root) {
         const char *p;
         UnitFileState state;
         UnitFileChange *changes = NULL;
-        unsigned n_changes = 0;
+        size_t n_changes = 0;
 
         assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "with-dropin-1@.service", &state) == -ENOENT);
         assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "with-dropin-2@.service", &state) == -ENOENT);