From nobody Tue Dec 28 01:07:35 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1D6E1191DB0E; Tue, 28 Dec 2021 01:07:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JNGbq5zpKz3Mxf; Tue, 28 Dec 2021 01:07:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD2A227F6E; Tue, 28 Dec 2021 01:07:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BS17Zoa005793; Tue, 28 Dec 2021 01:07:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BS17ZUE005792; Tue, 28 Dec 2021 01:07:35 GMT (envelope-from git) Date: Tue, 28 Dec 2021 01:07:35 GMT Message-Id: <202112280107.1BS17ZUE005792@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 3f1570847831 - main - itimers_alloc: no need to initialize its_timers array List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f1570847831e6dbcafc1f416f96404bf66048f2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640653655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UK9KDb+fj/tkA7NyaBPusSXZduAFns3smB1TLWAiO5g=; b=nqr7hxs+MFLqnvo258GOGPFmMKcRwcP6lK5+69pNZezUdTgfzx0xknk4537bsfOHLuPDKs Neg1ITROyrOrazDnc6jMveXoA5SIwAjc7xJpz/6feP1PvJoeQBl1z+t8o8BhXZEuXvvH8E Ax0x5RU1OmZM1p7Wyj9Jl0yZc4Xwp1B/RcmDpZi0lHHYzbCKpfU9AWEyadgG+tgAJB+tgj bKb32dfw95nm48ZVv9PgXgyyDRGYWyjuIXeBtGC0k90EwlCMoK9tNXqzRw/TVMggLpj73/ NoARWPYv+87CbbJgQJBHZYuNMY9C73qgpjzQ5kRg9QYQiQSa6fy5a7WWfdJNcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640653655; a=rsa-sha256; cv=none; b=MfAZTbcHAf0UGIvRMMLVn4LZFOP7YojLETWvmBwQsmRBy9B9SAs+Nd5XXuCl5gBIsKiKiH A9fzpTr4NBIEzJLoj3nKFzcVJ/3/oe2Ecsy9U/uZSnXiBQVmoCGgkFNBwLPi1BdkdJQCdh BLXoKO5CZbeNXTX8o0evQh68HnTmr8qtTt89GsvXuWhXcPX51cbYfIYJD/JIKcjFr9xzwQ g+5gyV3uClHQX3a6Yjw1MbI+wOSsl6HsBZNJnepe1oPcClNJHU1grajtAs788ZK4WrGyNL u7FT5oGps5btTtSVG/EOoERXg8U37Jfp+JvJzQjYdBsswJ1ZdRZwNn4+7uVDSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3f1570847831e6dbcafc1f416f96404bf66048f2 commit 3f1570847831e6dbcafc1f416f96404bf66048f2 Author: Konstantin Belousov AuthorDate: 2021-12-27 18:32:01 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-28 01:02:53 +0000 itimers_alloc: no need to initialize its_timers array struct itimers is allocated with M_ZERO, setting all members to NULL is tautological. Reviewed by: imp, markj, mav Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33670 --- 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;