From: Rich Felker Date: Thu, 8 Aug 2019 01:31:41 +0000 (-0400) Subject: remove spurious null check in clock_settime X-Git-Tag: v1.1.24~47 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a108127256a188130a80d6c7762ec8820e663b7c;p=oweals%2Fmusl.git 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. --- diff --git a/src/time/clock_settime.c b/src/time/clock_settime.c index 5fdaeb9e..1004ed15 100644 --- a/src/time/clock_settime.c +++ b/src/time/clock_settime.c @@ -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