From nobody Tue Sep 03 10:26:48 2024 X-Original-To: dev-commits-src-all@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 4Wyhcn51jxz5MkLH; Tue, 03 Sep 2024 10:26:49 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wyhcn14Qyz4rds; Tue, 3 Sep 2024 10:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725359209; 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=2+PrYPFYhE89ZGoWrTRH3XeVhPSxj9Ndt+NuzW6kf08=; b=mNH6VvvKmOoum9HaQvlkTF0hms1bOHiKIDCqomheMKbRnew4yeYMOYqs6nq+A5j3CxXULW Z9S5AyserFa29csYhVZVDAaMFvInEiHbS8tqE/IrtV/nhl7BJRolRsH6sUX4O1JoEWOeRc U0AzC5CZf5QXGGIbskGUH/TdqkkCsX9Jd/80c0uQzjJXweZ3yARgCEFYfrDl7ipD0KclRR LB0m7Jb9wtwlMisEMqryOa3sAFNWYgSEBn34KHi/aqZad+WPkN69EX3PeRSAxzusqIzoqO nxTufA8UZCt/HjQkqZa8KZvVXdfzJeSqsPnW3m36al/XRhzTh8kWMTfDHgoc4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725359209; a=rsa-sha256; cv=none; b=qtc2LT2JFIda1o53fjQxJs1LXLEzjyECYHFCVzRIdqbMvfnAstwCpglt1/aYZXrxrdCn+9 8WLgJYojIle56b3ax1TDDOSk7l9tMcL12de33ORuO3Y38vveo2oEtD1Py6a8on/qEuP7iL 2U4RkSvDhyNGiy2ZHqBVrx6bSkQzLrKkBebpyNCrPwxXq7r8TjXl0QptHh14Gl5KlWk3N7 mo5hEAeUZ80nIxlbrDqRvf1IOkJVt/Ih++g+TlfA5S2rBHjU3eDZ6bRTYj4gqCYppKLxko DeK1dhBOLA73P3EI9IVZVWA1nP2MbeYTPgPTJ9+SOtb34fxTrl8QAUrKNStRPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725359209; 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=2+PrYPFYhE89ZGoWrTRH3XeVhPSxj9Ndt+NuzW6kf08=; b=LZtw2cgytf1lL90VVaCcQ/BWPpiFJgaWajYCIZoU+whPJPatOoIh2j34Mp7pMmyxeC1ipJ zWNWGGyOpH5knLd6OhxhGZdFHTKVD437gl4H2gqYGWVntlqq0Wn/Mo4/khDbU1/bDIVVn7 uw/A2S4cwV8Ic2VbOLmJUwVTtwdoyPwbuPkKd11NEMINgjd26ud6tDXzkjKKBqdIrWErRw hq2WIrx4LwBbvlhyJTUIKWZDtKL7NVqmoQqkjMvRSan0dc5u5YGVngZ1u8WHQ0ZdhcqpnK JzX5V/eQnsGl9K6Mc4BiR0rrw28UR2gYRqV0I+FQ4HMR+T9H7SELVxJ5I2KxxQ== 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 4Wyhcn0g0VzcJt; Tue, 3 Sep 2024 10:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 483AQmdr008964; Tue, 3 Sep 2024 10:26:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 483AQmB0008961; Tue, 3 Sep 2024 10:26:48 GMT (envelope-from git) Date: Tue, 3 Sep 2024 10:26:48 GMT Message-Id: <202409031026.483AQmB0008961@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 2a119886630b - main - altq: Stop checking for failures from malloc(M_WAITOK) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a119886630bb5fe8283e20db5acb7c0cdba31c3 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=2a119886630bb5fe8283e20db5acb7c0cdba31c3 commit 2a119886630bb5fe8283e20db5acb7c0cdba31c3 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:19 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-03 10:25:19 +0000 altq: Stop checking for failures from malloc(M_WAITOK) While here, prefer malloc(M_ZERO) over bzero(). MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 --- sys/net/altq/altq_subr.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c index 3ade724818dd..534841289611 100644 --- a/sys/net/altq/altq_subr.c +++ b/sys/net/altq/altq_subr.c @@ -1327,12 +1327,7 @@ acc_add_filter(classifier, filter, class, phandle) return (EINVAL); #endif - afp = malloc(sizeof(struct acc_filter), - M_DEVBUF, M_WAITOK); - if (afp == NULL) - return (ENOMEM); - bzero(afp, sizeof(struct acc_filter)); - + afp = malloc(sizeof(*afp), M_DEVBUF, M_WAITOK | M_ZERO); afp->f_filter = *filter; afp->f_class = class;