projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37d6d09
)
remove spurious null check in clock_settime
author
Rich Felker
<dalias@aerifal.cx>
Thu, 8 Aug 2019 01:31:41 +0000
(21:31 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Thu, 8 Aug 2019 01:31:41 +0000
(21:31 -0400)
at the point of this check, the pointer has already been dereferenced.
clock_settime is not defined for null pointer arguments.
src/time/clock_settime.c
patch
|
blob
|
history
diff --git
a/src/time/clock_settime.c
b/src/time/clock_settime.c
index 5fdaeb9e424eba594d304a387529cb61c06a22c6..1004ed15284621129789270d0f97e30c5c462095 100644
(file)
--- 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