From nobody Fri Jun 17 19:41:31 2022 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 D09D885DE25; Fri, 17 Jun 2022 19:41:33 +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 4LPqDD4kf8z3jQF; Fri, 17 Jun 2022 19:41:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494893; 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=wGuI0bN3Pyi3KRHfZjqKw72D4h1+IcSqmqdp4FPRKAI=; b=MC4ReG6Z2ofdeQ7ocms7DFGTd7Q4a+xxSgwvAEgeoEeSExFR86Q9U4aJtiUa8LXL+dCvD5 7T6XjFJTktYpGXirAFs5SvogSa+Sf33PNQEv0DOQWVd13T5Y98rhfX6I7J1QgE4ZMhFy89 ojfrAX3F5SSEks1Wvnpa3+deJabcoyr1TyMfUhT7V9lgOrFkxD9DJqJ75twcKBjtVpDStX HreedQVmkZPTzZ3uj7aY4r2/EbzHAGTg9fSqUUNOWp8yPN0wVARg76sCS+Nlx4jCkFDaCR sVzir9WbBWpVjeHWsD7E7YWzr8FLBk0MX9saiajS2A1lbKWqD2YAQr6L86/e5w== 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 E22B125E0A; Fri, 17 Jun 2022 19:41:31 +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 25HJfVqP030587; Fri, 17 Jun 2022 19:41:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJfVUs030586; Fri, 17 Jun 2022 19:41:31 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:41:31 GMT Message-Id: <202206171941.25HJfVUs030586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 81d68fff1a8d - stable/13 - linux(4): Error is not a bool, use proper comparison 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 81d68fff1a8d968a49397e63b4d3eab9b40db1b9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494893; 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=wGuI0bN3Pyi3KRHfZjqKw72D4h1+IcSqmqdp4FPRKAI=; b=izaagPJrGk5lmeHjeIw6+jPOXMEpRvYaakREVjhT2vBwOTQh9+ZgszpfejPctHE+hsnYnI Gls00pXRnSvepEYLh+ru2TxHIRyIlmByKsJRAMZUX4VCdpyBzuFpev4a3y80zDzSBYqF3X pnSWgWXUNxHxEsnzffCTvvHuddIl5/n3p4zE2+06b8XTY4DOKD8wMwXvRwkAmIBPs44gA5 hwbHnayA/dnOxGsubcOVyjLltKinFSpk1UxsQmTTP7Tzlmx3UNoyO8vsqVPxrouBO03DtP yTDkqv2cP/u+OrDf+q+OXqb5KIfjn3iEtWS48uq4AZtuTnj6/Skq+GC7XJf6uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494893; a=rsa-sha256; cv=none; b=Ukcww7uWiyusC72KCoBnKPaA5U/DPrnL4af7Xz+MoOOKU2EdzVq+m7LNuws/oED1kHk726 9jfxNhWp1eWUVzEcKX2bi7pTbYGpuWGq2a5dyPc+4P4JvzPc3spV3KByDxQgMxyQCEvKgt u+15SXZBfUf1IQikbksYlFOU0af/Ot6tG4Gyc05LQDDlBEVetywz0eL3qs6BCFDOZC1+11 4R3tQjGdGRVSt4Dzb2ZzjD8ylJAG9eXvBpxMesy8jWHE00/T/yf0+3EJ8Wt+EAxCQmhR0B xZ3Ss1v8keQ6dPOZCypO+Xsb4ocGkSTfeDmKRjU6/nWT7oAeQqPw6rgqgGvf6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=81d68fff1a8d968a49397e63b4d3eab9b40db1b9 commit 81d68fff1a8d968a49397e63b4d3eab9b40db1b9 Author: Dmitry Chagin AuthorDate: 2022-05-30 17:00:30 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:35:40 +0000 linux(4): Error is not a bool, use proper comparison MFC afer: 2 weeks (cherry picked from commit 5573143777dd45d77163e208dc54426ac93896af) --- sys/compat/linux/linux_signal.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index a5f5d86d8c5d..7dab6b6775ee 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -181,7 +181,7 @@ linux_do_sigaction(struct thread *td, int linux_sig, l_sigaction_t *linux_nsa, sig = linux_to_bsd_signal(linux_sig); error = kern_sigaction(td, sig, nsa, osa, 0); - if (error) + if (error != 0) return (error); if (linux_osa != NULL) @@ -250,7 +250,7 @@ linux_rt_sigaction(struct thread *td, struct linux_rt_sigaction_args *args) if (args->act != NULL) { error = copyin(args->act, &nsa, sizeof(l_sigaction_t)); - if (error) + if (error != 0) return (error); } @@ -258,9 +258,8 @@ linux_rt_sigaction(struct thread *td, struct linux_rt_sigaction_args *args) args->act ? &nsa : NULL, args->oact ? &osa : NULL); - if (args->oact != NULL && !error) { + if (args->oact != NULL && error == 0) error = copyout(&osa, args->oact, sizeof(l_sigaction_t)); - } return (error); } @@ -305,7 +304,7 @@ linux_sigprocmask(struct thread *td, struct linux_sigprocmask_args *args) if (args->mask != NULL) { error = copyin(args->mask, &mask, sizeof(l_osigset_t)); - if (error) + if (error != 0) return (error); LINUX_SIGEMPTYSET(lset); lset.__mask = mask; @@ -316,7 +315,7 @@ linux_sigprocmask(struct thread *td, struct linux_sigprocmask_args *args) args->mask ? &set : NULL, args->omask ? &oset : NULL); - if (args->omask != NULL && !error) { + if (args->omask != NULL && error == 0) { mask = oset.__mask; error = copyout(&mask, args->omask, sizeof(l_osigset_t)); } @@ -340,9 +339,8 @@ linux_rt_sigprocmask(struct thread *td, struct linux_rt_sigprocmask_args *args) error = linux_do_sigprocmask(td, args->how, pset, args->omask ? &oset : NULL); - if (args->omask != NULL && !error) { + if (args->omask != NULL && error == 0) error = copyout(&oset, args->omask, sizeof(l_sigset_t)); - } return (error); } @@ -457,7 +455,7 @@ linux_common_rt_sigtimedwait(struct thread *td, l_sigset_t *mask, ksiginfo_init(&ksi); error = kern_sigtimedwait(td, bset, &ksi, tsa); - if (error) + if (error != 0) return (error); sig = bsd_to_linux_signal(ksi.ksi_signo);