]> Savannah Git Hosting - gnulib.git/commitdiff
readutmp: Fix compilation error on OpenBSD (regression 2023-08-11).
authorBruno Haible <bruno@clisp.org>
Sat, 12 Aug 2023 12:13:21 +0000 (14:13 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 12 Aug 2023 12:13:21 +0000 (14:13 +0200)
* lib/readutmp.c (read_utmp_from_file): Remove extraneous 'break'
statement.

ChangeLog
lib/readutmp.c

index 472349e5e4b0c579ee7480bd180a3ebcb32a0155..9f9637c988c6277c0161922a94796f1ff6eea3b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-08-12  Bruno Haible  <bruno@clisp.org>
+
+       readutmp: Fix compilation error on OpenBSD (regression 2023-08-11).
+       * lib/readutmp.c (read_utmp_from_file): Remove extraneous 'break'
+       statement.
+
 2023-08-11  Bruno Haible  <bruno@clisp.org>
 
        boot-time: Add comment about multithread-safety.
index f2e66899bb45816857d3054f08b7cc08f3079b77..d7baa69909faabf6ced2313e6dde4381e6ffc37e 100644 (file)
@@ -558,15 +558,12 @@ read_utmp_from_file (char const *file, idx_t *n_entries, STRUCT_UTMP **utmp_buf,
         {
           struct timespec boot_time;
           if (get_openbsd_boot_time (&boot_time) >= 0)
-            {
-              a = add_utmp (a, options,
-                            "reboot", strlen ("reboot"),
-                            "", 0,
-                            "", 0,
-                            "", 0,
-                            0, BOOT_TIME, boot_time, 0, 0, 0);
-              break;
-            }
+            a = add_utmp (a, options,
+                          "reboot", strlen ("reboot"),
+                          "", 0,
+                          "", 0,
+                          "", 0,
+                          0, BOOT_TIME, boot_time, 0, 0, 0);
         }
     }
 #   endif