Explorar o código

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.
Rich Felker %!s(int64=5) %!d(string=hai) anos
pai
achega
a108127256
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/time/clock_settime.c

+ 1 - 1
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