1
0
Fork 0
mirror of git://git.musl-libc.org/musl synced 2025-03-06 20:48:29 +01:00

remove spurious null check in clock_settime

at the point of this check, the pointer has already been dereferenced.
clock_settime is not defined for null pointer arguments.
This commit is contained in:
Rich Felker 2019-08-07 21:31:41 -04:00
parent 37d6d09ec6
commit a108127256

View file

@ -17,7 +17,7 @@ int clock_settime(clockid_t clk, const struct timespec *ts)
return __syscall_ret(r);
if (!IS32BIT(s))
return __syscall_ret(-ENOTSUP);
return syscall(SYS_clock_settime, clk, ts ? ((long[]){s, ns}) : 0);
return syscall(SYS_clock_settime, clk, ((long[]){s, ns}));
#else
return syscall(SYS_clock_settime, clk, ts);
#endif