summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2019-08-07 21:31:41 -0400
committerRich Felker <dalias@aerifal.cx>2019-08-07 21:31:41 -0400
commita108127256a188130a80d6c7762ec8820e663b7c (patch)
tree9ed6ef2ff121ee5215e6cb82632476bf55790cd4
parent37d6d09ec66d7d571031674586869e9162c13fb1 (diff)
downloadmusl-a108127256a188130a80d6c7762ec8820e663b7c.tar.gz
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.
-rw-r--r--src/time/clock_settime.c2
1 files changed, 1 insertions, 1 deletions
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