Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern ts2timo(9): further deobfuscation.
details: https://anonhg.NetBSD.org/src/rev/7cfab0b891a3
branches: trunk
changeset: 953710:7cfab0b891a3
user: nia <nia%NetBSD.org@localhost>
date: Thu Mar 18 12:37:51 2021 +0000
description:
ts2timo(9): further deobfuscation.
we want to check against NULL, so use it, rather than some random value on
the stack
diffstat:
sys/kern/subr_time.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diffs (35 lines):
diff -r 645028410666 -r 7cfab0b891a3 sys/kern/subr_time.c
--- a/sys/kern/subr_time.c Thu Mar 18 11:53:16 2021 +0000
+++ b/sys/kern/subr_time.c Thu Mar 18 12:37:51 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_time.c,v 1.26 2021/03/18 11:53:16 nia Exp $ */
+/* $NetBSD: subr_time.c,v 1.27 2021/03/18 12:37:51 nia Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_time.c,v 1.26 2021/03/18 11:53:16 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_time.c,v 1.27 2021/03/18 12:37:51 nia Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -327,15 +327,11 @@
int *timo, struct timespec *start)
{
int error;
- struct timespec tsd;
if (ts->tv_nsec < 0 || ts->tv_nsec >= 1000000000L)
return EINVAL;
- if (start == NULL)
- start = &tsd;
-
- if (flags != TIMER_RELTIME || start != &tsd) {
+ if (flags != TIMER_RELTIME || start != NULL) {
error = clock_gettime1(clock_id, start);
if (error != 0)
return error;
Home |
Main Index |
Thread Index |
Old Index