diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1776,7 +1776,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ else filedesc_flags = 0; - p = (struct proc *)arg; + p = arg; structsize = sizeof(struct kinfo_file); if (sb == NULL) { size = 0; @@ -2324,7 +2324,7 @@ else vmmap_flags = 0; - p = (struct proc *)arg; + p = arg; structsize = sizeof(struct kinfo_vmentry); if (sb == NULL) { size = 0; @@ -2351,7 +2351,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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),