changeset 24415:8ea8977db7ce

12108 libfakekernel: passing argument 4 to restrict-qualified parameter aliases with argument 3 Reviewed by: Matthias Scheler <mscheler@tintri.com> Approved by: Robert Mustacchi <rm@fingolfin.org>
author Toomas Soome <tsoome@me.com>
date Wed, 04 Dec 2019 22:07:28 +0200
parents c2fa434c8b83
children fd21ca7dfdf5
files usr/src/lib/libfakekernel/common/callout.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/lib/libfakekernel/common/callout.c	Sun Nov 25 23:57:15 2018 +0200
+++ b/usr/src/lib/libfakekernel/common/callout.c	Wed Dec 04 22:07:28 2019 +0200
@@ -66,7 +66,7 @@
 clock_t
 untimeout(timeout_id_t id_arg)
 {
-	struct itimerspec its;
+	struct itimerspec its, oits;
 	char *id_cp = id_arg;
 	clock_t delta;
 	timer_t tid;
@@ -79,11 +79,12 @@
 	tid = (int)(id_cp - timeout_base);
 
 	bzero(&its, sizeof (its));
-	rc = timer_settime(tid, 0, &its, &its);
+	bzero(&oits, sizeof (oits));
+	rc = timer_settime(tid, 0, &its, &oits);
 	if (rc != 0) {
 		delta = 0;
 	} else {
-		delta = TIMESTRUC_TO_TICK(&its.it_value);
+		delta = TIMESTRUC_TO_TICK(&oits.it_value);
 		if (delta < 0)
 			delta = 0;
 	}