On Tue, Jan 24, 2017 at 01:48:49AM +0100, Alexander Bluhm wrote:
> On Tue, Jan 24, 2017 at 10:01:02AM +1000, Martin Pieuchot wrote:
> > Updated diff, thanks for your review.
>
> > @@ -360,24 +358,20 @@ redo:
> > error = soaccept(so, nam);
> > if (!error && name != NULL)
> > error = copyaddrout(p, nam, name, namelen, anamelen);
> > -
> > + if (!error) {
> > + (*fp->f_ops->fo_ioctl)(fp, FIONBIO, (caddr_t)&nflag, p);
> > + FILE_SET_MATURE(fp, p);
> > + *retval = tmpfd;
> > + }
> > +out:
>
> Perhaps a goto out would be nicer than two if (!error).
No, there is a error = copyaddrout() assignment. Please disregard
my comment.
> error = soaccept(so, nam);
> if (error)
> goto out;
> if (name != NULL)
> error = copyaddrout(p, nam, name, namelen, anamelen);
> (*fp->f_ops->fo_ioctl)(fp, FIONBIO, (caddr_t)&nflag, p);
> FILE_SET_MATURE(fp, p);
> *retval = tmpfd;
> out:
>
> anyway OK bluhm@
Still OK bluhm@