From owner-dev-commits-src-all@freebsd.org Sun Jun 27 16:41:25 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9099E645CA7; Sun, 27 Jun 2021 16:41:25 +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 4GCc2F3c3Nz4d7R; Sun, 27 Jun 2021 16:41:25 +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 6326215A91; Sun, 27 Jun 2021 16:41:25 +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 15RGfPjG074352; Sun, 27 Jun 2021 16:41:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15RGfP6o074351; Sun, 27 Jun 2021 16:41:25 GMT (envelope-from git) Date: Sun, 27 Jun 2021 16:41:25 GMT Message-Id: <202106271641.15RGfP6o074351@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 61b4c6271809 - main - imgact_elf.c: style, remove unnecessary casts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61b4c62718093fc3a30041bb7fa4d31c7b6c31b2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jun 2021 16:41:25 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=61b4c62718093fc3a30041bb7fa4d31c7b6c31b2 commit 61b4c62718093fc3a30041bb7fa4d31c7b6c31b2 Author: Edward Tomasz Napierala AuthorDate: 2021-06-22 12:18:49 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-06-27 16:05: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 --- 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 d114070fc903..4a649664c917 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1776,7 +1776,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); @@ -2048,7 +2048,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); @@ -2105,7 +2105,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); @@ -2133,7 +2133,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); @@ -2154,7 +2154,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)); @@ -2176,7 +2176,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")); @@ -2240,7 +2240,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); @@ -2273,7 +2273,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; @@ -2324,7 +2324,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; @@ -2351,7 +2351,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")); @@ -2370,7 +2370,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")); @@ -2389,7 +2389,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")); @@ -2411,7 +2411,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")); @@ -2430,7 +2430,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")); @@ -2453,7 +2453,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),