]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsclocks: use MAX_CLOCKS, improve indention master
authorKarel Zak <kzak@redhat.com>
Thu, 14 Aug 2025 10:38:29 +0000 (12:38 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 14 Aug 2025 10:39:36 +0000 (12:39 +0200)
Let's follow the kernel and use MAX_CLOCKS to define CLOCK_AUX.

Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/lsclocks.c

index 946b88be19053ee14a58ff2e3f13c463aaf20aec..8c611816244547a57fa77276c01d9fb7a41a299f 100644 (file)
@@ -48,43 +48,43 @@ static inline clockid_t FD_TO_CLOCKID(int fd)
 }
 
 #ifndef CLOCK_REALTIME
-#define CLOCK_REALTIME                 0
+# define CLOCK_REALTIME                        0
 #endif
 
 #ifndef CLOCK_MONOTONIC
-#define CLOCK_MONOTONIC                        1
+# define CLOCK_MONOTONIC                       1
 #endif
 
 #ifndef CLOCK_MONOTONIC_RAW
-#define CLOCK_MONOTONIC_RAW            4
+# define CLOCK_MONOTONIC_RAW           4
 #endif
 
 #ifndef CLOCK_REALTIME_COARSE
-#define CLOCK_REALTIME_COARSE          5
+# define CLOCK_REALTIME_COARSE         5
 #endif
 
 #ifndef CLOCK_MONOTONIC_COARSE
-#define CLOCK_MONOTONIC_COARSE         6
+# define CLOCK_MONOTONIC_COARSE                6
 #endif
 
 #ifndef CLOCK_BOOTTIME
-#define CLOCK_BOOTTIME                 7
+# define CLOCK_BOOTTIME                        7
 #endif
 
 #ifndef CLOCK_REALTIME_ALARM
-#define CLOCK_REALTIME_ALARM           8
+# define CLOCK_REALTIME_ALARM          8
 #endif
 
 #ifndef CLOCK_BOOTTIME_ALARM
-#define CLOCK_BOOTTIME_ALARM           9
+# define CLOCK_BOOTTIME_ALARM          9
 #endif
 
 #ifndef CLOCK_TAI
-#define CLOCK_TAI                      11
+# define CLOCK_TAI                     11
 #endif
 
 #ifndef CLOCK_AUX
-#define CLOCK_AUX                      16
+# define CLOCK_AUX                     MAX_CLOCKS
 #endif
 
 #define CLOCK_AUX0                     (CLOCK_AUX + 0)