diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-10-14 11:11:53 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-10-14 11:40:40 +0200 |
commit | f8662fee2fac735385dc060f1435e4af5327138d (patch) | |
tree | f2d3c0599cc6fcd7bb095d38921be106ed593031 /src/test/test-install.c | |
parent | 4554c178bf07ded86f9f3982f26e87afd1caf0f4 (diff) | |
download | systemd-f8662fee2fac735385dc060f1435e4af5327138d.tar.gz |
install: make InstallChange enum type a proper type
We can just make this an enum, as long as we ensure it has enough range,
which we can do by adding -ERRNO_MAX as one possible value (at least on
GNU C). We already do that at multiple other places, so let's do this
here too.
Diffstat (limited to 'src/test/test-install.c')
-rw-r--r-- | src/test/test-install.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test-install.c b/src/test/test-install.c index 309b18c535..c9b08d7b6a 100644 --- a/src/test/test-install.c +++ b/src/test/test-install.c @@ -12,9 +12,9 @@ static void dump_changes(InstallChange *c, unsigned n) { assert_se(n == 0 || c); for (i = 0; i < n; i++) { - if (c[i].change_or_errno == INSTALL_CHANGE_UNLINK) + if (c[i].type == INSTALL_CHANGE_UNLINK) printf("rm '%s'\n", c[i].path); - else if (c[i].change_or_errno == INSTALL_CHANGE_SYMLINK) + else if (c[i].type == INSTALL_CHANGE_SYMLINK) printf("ln -s '%s' '%s'\n", c[i].source, c[i].path); } } |