Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Jan 2022 19:08:05 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 840b422b7c4b - stable/13 - itimers_alloc: no need to initialize its_timers array
Message-ID:  <202201021908.202J85RL057589@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=840b422b7c4b50fb83fb7ae8e82b99b7fab424f2

commit 840b422b7c4b50fb83fb7ae8e82b99b7fab424f2
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-12-27 18:32:01 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-01-02 16:43:00 +0000

    itimers_alloc: no need to initialize its_timers array
    
    (cherry picked from commit 3f1570847831e6dbcafc1f416f96404bf66048f2)
---
 sys/kern/kern_time.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c
index a52dc83e9b4c..4c53b728a500 100644
--- a/sys/kern/kern_time.c
+++ b/sys/kern/kern_time.c
@@ -1785,14 +1785,11 @@ static void
 itimers_alloc(struct proc *p)
 {
 	struct itimers *its;
-	int i;
 
 	its = malloc(sizeof (struct itimers), M_SUBPROC, M_WAITOK | M_ZERO);
 	LIST_INIT(&its->its_virtual);
 	LIST_INIT(&its->its_prof);
 	TAILQ_INIT(&its->its_worklist);
-	for (i = 0; i < TIMER_MAX; i++)
-		its->its_timers[i] = NULL;
 	PROC_LOCK(p);
 	if (p->p_itimers == NULL) {
 		p->p_itimers = its;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201021908.202J85RL057589>