From nobody Thu May 04 18:52:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC2xw0y4Rz49QD5; Thu, 4 May 2023 18:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC2xw0RD0z4JDf; Thu, 4 May 2023 18:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p9cn8eWZRrJTaHDNXtb63gm/wchZOd8HqBVXtZ2yWHU=; b=l+GQtT5sJykqVz4Vtv4pKG4soq3Cbn8Hg7P21sekpcEUV34fx+FfsXedekgQCCMAcceOpP MjTdQdoA2mERg+smSJrpQbjgcJeQQSLvova1czMoaTbfjr2h+lW86RDu/FldKEJa/KuNhP XHsuGiZtHF58o/+Y0nWuM+DoRITQfjS4SN6tvd5br25KFFOVWfILopleNVEN1KGwyrnwpw qMI6Jd1hEWKQZh6156sRBVmcgepJrGRxo7DVDV4zRwxZm7ATerfnL4dnYeTqneNBT2CxIp oZRFGgYKC28zMZ0E+TUsttv8uoU0jeHPUI7HVn7WJpIGG7NJ2VibbaWk07AUwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p9cn8eWZRrJTaHDNXtb63gm/wchZOd8HqBVXtZ2yWHU=; b=K/f8UrnRwl2VIf9DYqYTRA2Hv7yeO1JdUoh3K56ApXm5xZXsxb91C8D4Tx4L7ktknOtx9W tVO50zbiWv2d5qwfEe1DD78uUtT0+HLQzztmJ1QMT4GfjXf5Hm5rcwGUd4XM525J+NG68z d9OMzoI165WccALoOwRTirZR02vNRRlj1z2rslWkR8JF/0zoMsRl9oxT8bv3H/WRLPQMbw zDk/vYsLIaRtsrIjFPulQ/3U7zRPocWEJFoEwJBxN/Q6jo1PZE/uy36s9bdqhd7/CW7Qus /FnTVSuwbgO9OnAP96RMrNRkD/auiEfnlHlp5zjq9HYliqyDVE4m9HsP1uNggw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683226372; a=rsa-sha256; cv=none; b=wDkiB/e6BtUa23h7/Znx1ZHCtFX6IXOv7uHVMAR15mvGkUQv8G1DUAkxAPOr2FKmfnshFx bUmi8AOutuQW+S2JUrbruBVcaGV8Hel1O9W59saoYdXNYlJq4ilZThXWfjHliKBtNmAAP6 vQdH5+TTdDXx1jqGv8yigyatHW9GpNjGFBc4GEaeB4R319ubDhDiykumCBc8bdfphlU9yu 8dvqIHD/qZ71MmF5yzPwb6cK1EzAOADv+TxOmKGl4/lKwZQVoOJt/iC1NnmUJXCRQirFbV /NoMLt8b3zT3uD5r58iAE1taeNKrF/oCyO3QhGRUQAljkgxdODhUuylSaO2/Yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC2xv6ZshzP5p; Thu, 4 May 2023 18:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344Iqp8T082005; Thu, 4 May 2023 18:52:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344IqpV7082004; Thu, 4 May 2023 18:52:51 GMT (envelope-from git) Date: Thu, 4 May 2023 18:52:51 GMT Message-Id: <202305041852.344IqpV7082004@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 5903d9c00b75 - main - ncal: Error out if writing to stdout failed. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5903d9c00b75f17f09404d1001ee5aaae7603a61 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5903d9c00b75f17f09404d1001ee5aaae7603a61 commit 5903d9c00b75f17f09404d1001ee5aaae7603a61 Author: Dag-Erling Smørgrav AuthorDate: 2023-05-04 17:26:54 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-05-04 18:51:10 +0000 ncal: Error out if writing to stdout failed. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D39958 --- usr.bin/ncal/ncal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/ncal/ncal.c b/usr.bin/ncal/ncal.c index 5a6c33ce759d..b4f025141f92 100644 --- a/usr.bin/ncal/ncal.c +++ b/usr.bin/ncal/ncal.c @@ -497,6 +497,8 @@ main(int argc, char *argv[]) monthrangeb(y, m, flag_julian_day, before, after); else monthranger(y, m, flag_julian_day, before, after); + if (ferror(stdout) != 0 || fflush(stdout) != 0) + err(1, "stdout"); return (0); }