chiark / gitweb /
systemctl: sort 'list-units' output
[elogind.git] / src / utmp-wtmp.c
index 45da79c681c8e3d92bf1abf2db75630593462ae6..46dfba336aaa7317ba9824cbc230b20e71e0be6f 100644 (file)
@@ -202,11 +202,11 @@ int utmp_put_runlevel(usec_t t, int runlevel, int previous) {
 
                         previous = 0;
                 }
-
-                if (previous == runlevel)
-                        return 0;
         }
 
+        if (previous == runlevel)
+                return 0;
+
         init_entry(&store, t);
 
         store.ut_type = RUN_LVL;