Subject: Re: code in kern_proc.c
To: Christos Zoulas <christos@zoulas.com>
From: Ian Zagorskih <ianzag@megasignal.com>
List: tech-kern
Date: 12/23/2003 01:32:02
----- Original Message -----
From: "Christos Zoulas" <christos@zoulas.com>
To: <tech-kern@NetBSD.org>
Sent: Monday, December 22, 2003 10:50 PM
Subject: Re: code in kern_proc.c


> In article <006501c3c8ae$56799860$3964a8c0@ianzag>,
> Ian Zagorskih <ianzag@megasignal.com> wrote:
> >
> >I'm wondering if this "goto out" is really required here ? I.e. isn't
code
> >like:
> >
> >for (p = PIDHASH(pid)->lh_first; p != 0; p = p->p_hash.le_next)
> >    if (p->p_pid == pid) break;
> >
> >..does the same ? I'm not complaining about "goto is bad || good" just
> >wondering if i'm missing something and this goto really does smth that
break
> >cannot :)
>
> Yes it does the same, and should be preferred in this case. OTOH, we don't
> have such code anymore in kern_proc.c
>

This code was from NetBSD 1.6.1-stable. AFAIU it's replaced in -current,
thanks.

// wbr