Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/timens: timerfd: Use correct clockid type in tclock_gettime()

tclock_gettime() is a wrapper around clock_gettime().
The first parameter of clock_gettime() is of type "clockid_t",
not "clock_t".

Use the correct type instead.

Link: https://lore.kernel.org/r/20250502-selftests-timens-fixes-v1-3-fb517c76f04d@linutronix.de
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Thomas Weißschuh and committed by
Shuah Khan
1efe2022 261639fa

+1 -1
+1 -1
tools/testing/selftests/timens/timerfd.c
··· 15 15 #include "log.h" 16 16 #include "timens.h" 17 17 18 - static int tclock_gettime(clock_t clockid, struct timespec *now) 18 + static int tclock_gettime(clockid_t clockid, struct timespec *now) 19 19 { 20 20 if (clockid == CLOCK_BOOTTIME_ALARM) 21 21 clockid = CLOCK_BOOTTIME;