Procházet zdrojové kódy

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 před 5 roky
rodič
revize
a108127256
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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