From nobody Thu May 12 22:56:28 2022 X-Original-To: dev-commits-src-branches@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 052D61AE499B; Thu, 12 May 2022 22:56:30 +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 4KznFn2trsz3GN1; Thu, 12 May 2022 22:56:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652396189; 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=7gluPyGmgexR7OqM/h+k1zJES3XN5CodjbXvudkjAWk=; b=VuNVueAyKkRLlryWbMclQvEYdswv+WqguD5mEQucav+4KsWnGfDRztY60i3+35OPMG/1QV Csx8yL6vrUueN9rMNRsS8zjtB2yJtcZpx5J2TsYlDGjmLch1tQKqHVUIMG2rEBFOTDNOBa jxEuujgXsxPbOC39P/nZ0swIJOraFy8R4pfPpMAGaYgHzJbM5me+4DTBxDEn4oShjGoLvW vD5RhvYoBg3v5CrrinSYbzY2J0K5VoAyi28LX8WpmEcF+fkmdXgwEk4l+55V7OU5UoztUy bkOpB5djhw40i0XNIOUl9n0UHZJJoS55SUTtlZ6tpf6sJWfVEespzKFCa/hV/w== 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 04689172F3; Thu, 12 May 2022 22:56:29 +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 24CMuSFv020541; Thu, 12 May 2022 22:56:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24CMuSTT020540; Thu, 12 May 2022 22:56:28 GMT (envelope-from git) Date: Thu, 12 May 2022 22:56:28 GMT Message-Id: <202205122256.24CMuSTT020540@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: f44a8039fe39 - stable/13 - imgact_elf.c: style, remove unnecessary casts List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f44a8039fe391390d945c0baa4d3c4b8c34dd308 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652396189; 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=7gluPyGmgexR7OqM/h+k1zJES3XN5CodjbXvudkjAWk=; b=eTevAVLNEib0Zt5y2ZuOXh8nMv4tPIPaZ2TJk08YxF0zb/s4PhTqDs7pS/suU7jljZj1wH ZMp7foh8yone5gE4kh+XQbfn16IxBYQzemjvwncmYs5Ufk6tTfGsYSuK28Y4DuHNiJlVoo B8gypPhENgWrOy6Oj1Sw5oTOhL7rjiWEHudc+AEfDnP9VgpT7juYInERJXgYeTh7+/lB2k JpYwaq70jq84CNb8H8+aLeVenPlwi9a1Or7c3H3vcRvUM8xAy0onjITa2Kp5H9dijyuu7n x5Vssuj6UT1TdCPmKFnQjLMgZqS1IBNvzeRepVfQuB/IdjQZATYRTeDNp1SvVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652396189; a=rsa-sha256; cv=none; b=IQXcLlGpomEytai8DIQfBXOt40bQuJEyr0SW/CXfmAooUBRc0lLkHC7sV+2YMYcO7hHLmv FOjUxgR2dML7Ie0OcJ8hRBAfRD98dHryouun/Zjvhxu9v4tJifpJAdRQOE8qG1EW4JOicH p1+FpGdmzQ6tG1UFL8W03ozbIATb0T8IrKwY85crGsPo/NJAxVvSkh0gfIFgAZHj9dvswI GC73Rep3/LHQF2kb4TocwPY256/+AFs+OsQvndJqTxRJ8F8FQZg55kRFjWs3G28MwIUFSm N5ub7mikX8zdVtwQxBN7zNOtyekbBa1ud5e+n+WvKFygTJ+pFV0Ftp9ZD3iiLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f44a8039fe391390d945c0baa4d3c4b8c34dd308 commit f44a8039fe391390d945c0baa4d3c4b8c34dd308 Author: Edward Tomasz Napierala AuthorDate: 2021-06-22 12:18:49 +0000 Commit: John Baldwin CommitDate: 2022-05-12 22:12:59 +0000 imgact_elf.c: style, remove unnecessary casts Remove unnecessary type casts and redundant brackets. No functional changes. Suggested By: kib Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30841 (cherry picked from commit 61b4c62718093fc3a30041bb7fa4d31c7b6c31b2) --- sys/kern/imgact_elf.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 1732b0dbe23d..c68cf17fc795 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1846,7 +1846,7 @@ __elfN(prepare_notes)(struct thread *td, struct note_info_list *list, size += register_note(list, -1, __elfN(note_threadmd), thr); - thr = (thr == td) ? TAILQ_FIRST(&p->p_threads) : + thr = thr == td ? TAILQ_FIRST(&p->p_threads) : TAILQ_NEXT(thr, td_plist); if (thr == td) thr = TAILQ_NEXT(thr, td_plist); @@ -2118,7 +2118,7 @@ __elfN(note_prpsinfo)(void *arg, struct sbuf *sb, size_t *sizep) elf_prpsinfo_t *psinfo; int error; - p = (struct proc *)arg; + p = arg; if (sb != NULL) { KASSERT(*sizep == sizeof(*psinfo), ("invalid size")); psinfo = malloc(sizeof(*psinfo), M_TEMP, M_ZERO | M_WAITOK); @@ -2175,7 +2175,7 @@ __elfN(note_prstatus)(void *arg, struct sbuf *sb, size_t *sizep) struct thread *td; elf_prstatus_t *status; - td = (struct thread *)arg; + td = arg; if (sb != NULL) { KASSERT(*sizep == sizeof(*status), ("invalid size")); status = malloc(sizeof(*status), M_TEMP, M_ZERO | M_WAITOK); @@ -2203,7 +2203,7 @@ __elfN(note_fpregset)(void *arg, struct sbuf *sb, size_t *sizep) struct thread *td; elf_prfpregset_t *fpregset; - td = (struct thread *)arg; + td = arg; if (sb != NULL) { KASSERT(*sizep == sizeof(*fpregset), ("invalid size")); fpregset = malloc(sizeof(*fpregset), M_TEMP, M_ZERO | M_WAITOK); @@ -2224,7 +2224,7 @@ __elfN(note_thrmisc)(void *arg, struct sbuf *sb, size_t *sizep) struct thread *td; elf_thrmisc_t thrmisc; - td = (struct thread *)arg; + td = arg; if (sb != NULL) { KASSERT(*sizep == sizeof(thrmisc), ("invalid size")); bzero(&thrmisc, sizeof(thrmisc)); @@ -2246,7 +2246,7 @@ __elfN(note_ptlwpinfo)(void *arg, struct sbuf *sb, size_t *sizep) struct ptrace_lwpinfo pl; #endif - td = (struct thread *)arg; + td = arg; size = sizeof(structsize) + sizeof(pl); if (sb != NULL) { KASSERT(*sizep == size, ("invalid size")); @@ -2310,7 +2310,7 @@ __elfN(note_procstat_proc)(void *arg, struct sbuf *sb, size_t *sizep) size_t size; int structsize; - p = (struct proc *)arg; + p = arg; size = sizeof(structsize) + p->p_numthreads * sizeof(elf_kinfo_proc_t); @@ -2343,7 +2343,7 @@ note_procstat_files(void *arg, struct sbuf *sb, size_t *sizep) else filedesc_flags = 0; - p = (struct proc *)arg; + p = arg; structsize = sizeof(struct kinfo_file); if (sb == NULL) { size = 0; @@ -2394,7 +2394,7 @@ note_procstat_vmmap(void *arg, struct sbuf *sb, size_t *sizep) else vmmap_flags = 0; - p = (struct proc *)arg; + p = arg; structsize = sizeof(struct kinfo_vmentry); if (sb == NULL) { size = 0; @@ -2421,7 +2421,7 @@ note_procstat_groups(void *arg, struct sbuf *sb, size_t *sizep) size_t size; int structsize; - p = (struct proc *)arg; + p = arg; size = sizeof(structsize) + p->p_ucred->cr_ngroups * sizeof(gid_t); if (sb != NULL) { KASSERT(*sizep == size, ("invalid size")); @@ -2440,7 +2440,7 @@ note_procstat_umask(void *arg, struct sbuf *sb, size_t *sizep) size_t size; int structsize; - p = (struct proc *)arg; + p = arg; size = sizeof(structsize) + sizeof(p->p_pd->pd_cmask); if (sb != NULL) { KASSERT(*sizep == size, ("invalid size")); @@ -2459,7 +2459,7 @@ note_procstat_rlimit(void *arg, struct sbuf *sb, size_t *sizep) size_t size; int structsize, i; - p = (struct proc *)arg; + p = arg; size = sizeof(structsize) + sizeof(rlim); if (sb != NULL) { KASSERT(*sizep == size, ("invalid size")); @@ -2481,7 +2481,7 @@ note_procstat_osrel(void *arg, struct sbuf *sb, size_t *sizep) size_t size; int structsize; - p = (struct proc *)arg; + p = arg; size = sizeof(structsize) + sizeof(p->p_osrel); if (sb != NULL) { KASSERT(*sizep == size, ("invalid size")); @@ -2500,7 +2500,7 @@ __elfN(note_procstat_psstrings)(void *arg, struct sbuf *sb, size_t *sizep) size_t size; int structsize; - p = (struct proc *)arg; + p = arg; size = sizeof(structsize) + sizeof(ps_strings); if (sb != NULL) { KASSERT(*sizep == size, ("invalid size")); @@ -2523,7 +2523,7 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep) size_t size; int structsize; - p = (struct proc *)arg; + p = arg; if (sb == NULL) { size = 0; sb = sbuf_new(NULL, NULL, AT_COUNT * sizeof(Elf_Auxinfo),