From owner-freebsd-bugs@FreeBSD.ORG Wed Jun 7 20:43:51 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0771316AEA3 for ; Wed, 7 Jun 2006 19:00:41 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1F1243D5A for ; Wed, 7 Jun 2006 19:00:40 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k57J0eDf055197 for ; Wed, 7 Jun 2006 19:00:40 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k57J0emQ055196; Wed, 7 Jun 2006 19:00:40 GMT (envelope-from gnats) Date: Wed, 7 Jun 2006 19:00:40 GMT Message-Id: <200606071900.k57J0emQ055196@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: PaulFM Cc: Subject: Re: bin/98625: ypserv ignores the -n option (it always acts like -n has been specified) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: PaulFM List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2006 20:43:55 -0000 The following reply was made to PR bin/98625; it has been noted by GNATS. From: PaulFM To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/98625: ypserv ignores the -n option (it always acts like -n has been specified) Date: Wed, 07 Jun 2006 12:46:37 -0500 Looks like a problem with parenthesis (precedence) - or it could be a bug in the FREEBSD C compiler. I added 2 sets of parenthesis and now it works! diff -u yp_server.c ORIG/yp_server.c ------------------------------------------------------------------------ --- yp_server.c Wed Jun 7 12:30:42 2006 +++ ORIG/yp_server.c Wed Jun 7 12:29:48 2006 @@ -164,11 +164,11 @@ */ #ifdef DB_CACHE - if ((result.stat != YP_TRUE) && + if (result.stat != YP_TRUE && (yp_testflag(argp->map, argp->domain, YP_INTERDOMAIN) || ((strstr(argp->map, "hosts") || strstr(argp->map, "ipnodes")) && do _dns))) { #else - if (do_dns && (result.stat != YP_TRUE) && + if (do_dns && result.stat != YP_TRUE && (strstr(argp->map, "hosts") || strstr(argp->map, "ipnodes"))) { #endif char nbuf[YPMAXRECORD]; ------------------------------------------------------------------------ -- --------------------------------------------------------------------- The views and opinions expressed above are strictly those of the author(s). The content of this message has not been reviewed nor approved by any entity whatsoever. --------------------------------------------------------------------- Paul F. Markfort Info/Web: http://www.menet.umn.edu/~paulfm ---------------------------------------------------------------------