Date: Sun, 17 Sep 2000 10:40:01 -0700 (PDT) From: Bill Fumerola <billf@chimesnet.com> To: freebsd-bugs@FreeBSD.org Subject: Re: i386/21329: change to allow vm86 interrupt calls from userland Message-ID: <200009171740.KAA23471@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/21329; it has been noted by GNATS. From: Bill Fumerola <billf@chimesnet.com> To: Jonathan Chen <jon@spock.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009171740.KAA23471>