From owner-cvs-all@FreeBSD.ORG Mon Jun 11 13:02:17 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F32C216A468; Mon, 11 Jun 2007 13:02:16 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id E397B13C45E; Mon, 11 Jun 2007 13:02:16 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l5BD2Gj7000872; Mon, 11 Jun 2007 13:02:16 GMT (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l5BD2GcT000865; Mon, 11 Jun 2007 13:02:16 GMT (envelope-from bde) Message-Id: <200706111302.l5BD2GcT000865@repoman.freebsd.org> From: Bruce Evans Date: Mon, 11 Jun 2007 13:02:16 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sbin/sysctl sysctl.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2007 13:02:17 -0000 bde 2007-06-11 13:02:16 UTC FreeBSD src repository Modified files: sbin/sysctl sysctl.c Log: When we return from a "show" function without printing anything except a warning, return 1 instead of 0 to indicate that we didn't print anything, so that top-level callers don't print a spurious newline. This is mainly to fix output formatting when stderr is redirected. It also helps in some cases when stderr is interleaved with stdout, depending on the details of the interleaving (this program has the usual null explicit support for syncing stderr with stdout). Return 1 instead of -1 after printing the "malloc failed" warning, since the return value is boolean. Revision Changes Path 1.86 +6 -6 src/sbin/sysctl/sysctl.c