diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-07-02 14:25:06 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-07-02 17:12:23 +0200 |
commit | e9d9d50cefaae3d2db6d1f9873371290de2c7c36 (patch) | |
tree | 5986d4067df57343e64d811a1cb1a59813aac9e3 /src/update-utmp | |
parent | bc9d1dbfc827c22ace2e5fb6755f7e7b93aba3b1 (diff) | |
download | systemd-e9d9d50cefaae3d2db6d1f9873371290de2c7c36.tar.gz |
initctl,update-utmp: define iterator variable in loop
Diffstat (limited to 'src/update-utmp')
-rw-r--r-- | src/update-utmp/update-utmp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/update-utmp/update-utmp.c b/src/update-utmp/update-utmp.c index 28f1aadabc..47354d5012 100644 --- a/src/update-utmp/update-utmp.c +++ b/src/update-utmp/update-utmp.c @@ -84,11 +84,10 @@ static int get_current_runlevel(Context *c) { _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; int r; - unsigned i; assert(c); - for (i = 0; i < ELEMENTSOF(table); i++) { + for (size_t i = 0; i < ELEMENTSOF(table); i++) { _cleanup_free_ char *state = NULL, *path = NULL; path = unit_dbus_path_from_name(table[i].special); |