From owner-freebsd-bugs Sun Sep 17 10:40: 5 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 00EBF37B424 for ; Sun, 17 Sep 2000 10:40:02 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id KAA23471; Sun, 17 Sep 2000 10:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Sun, 17 Sep 2000 10:40:01 -0700 (PDT) Message-Id: <200009171740.KAA23471@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bill Fumerola Subject: Re: i386/21329: change to allow vm86 interrupt calls from userland Reply-To: Bill Fumerola Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR i386/21329; it has been noted by GNATS. From: Bill Fumerola To: Jonathan Chen Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: i386/21329: change to allow vm86 interrupt calls from userland Date: Sun, 17 Sep 2000 13:31:14 -0400 just a little style police.. On Sun, Sep 17, 2000 at 01:17:31PM -0400, Jonathan Chen wrote: > case VM86_INTCALL: { > struct vm86_intcall_args sa; > > - if (error = copyin(ua.sub_args, &sa, sizeof(sa))) > + if (p->p_cred->pc_ucred->cr_uid != 0) return EPERM; > + if (p->p_cred->pc_ucred->cr_uid != 0) return EPERM; > + if ((error = copyin(ua.sub_args, &sa, sizeof(sa)))) Gratuitous parens. Optionally, add an explicit check here (ie, != 0 or something) in which case the parens actually make sense. > return (error); > - if (error = vm86_intcall(sa.intnum, &sa.vmf)) > + if ((error = vm86_intcall(sa.intnum, &sa.vmf))) See previous. > return (error); > error = copyout(&sa, ua.sub_args, sizeof(sa)); > } > break; > -#endif Naturally, I can't give you technical feedback, just style(9) fascism. :-> -- Bill Fumerola - Network Architect, BOFH / Chimes, Inc. billf@chimesnet.com / billf@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message