Subject: Re: bin/3280: ypserv creats pid file of wrong contents; it records pid of parent
To: None <gnats-bugs@gnats.netbsd.org, netbsd-bugs@NetBSD.ORG>
From: Mike Long <mike.long@analog.com>
List: netbsd-bugs
Date: 03/03/1997 14:45:27
>Date: Mon, 3 Mar 1997 12:30:47 -0500 (EST)
>From: der Mouse  <mouse@Rodents.Montreal.QC.CA>
>
>> >Fix:
>> 	Note that this patch also includes indentation fix of line
>> 	`openlog("ypserv", LOG_PID, LOG_DAEMON);'.
>
>Based on the original code, the intent was probably to have the openlog
>within the scope of the if, in which case the correct thing to do is
>add braces, not dedent the openlog() call. :-)  Not that it might not
>be better to do the openlog all the time, but it should be thought
>about.

The line immediately after the if calls err(); I strongly doubt that
the author intended to call openlog() after err(), which never
returns.
-- 
Mike Long <mike.long@analog.com>     <URL:http://www.shore.net/~mikel>
VLSI Design Engineer         finger mikel@shore.net for PGP public key
Analog Devices, CPD Division          CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA       (eq (opinion 'ADI) (opinion 'mike)) -> nil