Date: Sun, 2 Apr 1995 13:36:18 +1000 From: Bruce Evans <bde@zeta.org.au> To: CVS-commiters@freefall.cdrom.com, cvs-usrsbin@freefall.cdrom.com, wpaul@freefall.cdrom.com Subject: Re: cvs commit: src/usr.sbin/ypbind ypbind.c Message-ID: <199504020336.NAA29929@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>wpaul 95/04/01 19:10:58 > Modified: usr.sbin/ypbind ypbind.c > Log: > Fix long standing bogosity in ypbind: if /var/yp/binding doesn't exist, > ypbind is supposed to create it but it doesn't. This is because when > it checks the return value for the attempted open() of > /var/yp/binding/DOMAIN.VERSION, it tests only for a value of -1. This > is bogus because open() doesn't return -1 in this case. Now it checks > for < 0 instead. open() is spec'ed to return -1 for errors. When doesn't it? It is also spec'ed to return a non-negative integer so checking for < 0 is safer, but I prefer -1 for consistency with syscalls like read(). Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504020336.NAA29929>