From nobody Mon Nov 06 14:44:26 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 4SPDdR1vCGz4yrPn; Mon, 6 Nov 2023 14:44:27 +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 4SPDdR17Xmz3MKH; Mon, 6 Nov 2023 14:44:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699281867; 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=zSsVDjN7I0NxkBz6ziQfbWJ9knUwJ/fQMUl5o9MjSlI=; b=VlMXxziCWiOkdOHS2n3lgkMRs80CSKWc9OsmoG1BurXudeIPOLkC4uaqq5SduLSqNWs4Z4 WGUw8vdyXislngSWr+ClNyRSrfim7NWA1oG8YxVz8QAYb954Hqulq1bp8tjMMArVcBWQ+C b2gbH4l7vrCYBnFPKO6Q1hZpv2tqr/+KQ57+Q1x5bpjPXJXsoxQxeCg/apNQD5GMoEBxWf EF3Gdt5t2hk5b5Om6z9E0KQVzaHi6wGKigO7CqQXK/N58ddxS9bJmYrREAFxoLvjThLJHs mqxDGXKON37qzS5J9YKJPLKRZzdX3aXGgvgU436whYBj+zZ86NiG9edx1lfDxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699281867; 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=zSsVDjN7I0NxkBz6ziQfbWJ9knUwJ/fQMUl5o9MjSlI=; b=TiGcH2i4G/NCvg1fndJI6+higbbMgTvE65TBNmdlGF6WABjfRi70mMuD05NH+83EE4itgg C5v0Agf/b2o2Y98RkdP62/3iBpqfr+bhJM5dEhMD3o2QQ9eJxwWLWQq3HGDAHtooeVbeHn j+itMrUcjeEEuNtc8/A1CQqlIyPnrShAYaMpA8a1JJcrnPiLJEylWw0geH9DC+Vxvqo+ZS tA6RAqI46y31n5Tg4Gz7mYGAcgVjF3cfIw47KErUBUXsKXDDGCCPuacXK72W3vAoR/dOFA IWtRwrHiyCBsme+8w9SAMHx1YTCmKLHS1HgyyUw97+E7mR4UtAZgDfRllwtaIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699281867; a=rsa-sha256; cv=none; b=M9IUCQTSP5el19dPs6VnrZDzgnZo+HRd714Jq5dgwtgSspABESrCBzPkVpiXdy8iG7sWJW LCO8uK3a9YCaE6eo2OdyD4duthRgONDE78fVnfN6X/iZr76njZMpeBiGHZv+B1tuI4hPiR jd72iglxpkN6wkW4jRvvcoSZxSW0dSegV9Xtn7w+Pg7LIqTiwm0D1JpSk1zXKuvECFQzrs VPQeU/IT5gDJhdaCUyEdCe+NJ2J6b0+qwzyhDblvP2J6cc/CjD3/XsbjQ1IKU/hSMKRcmz wq711nSdZicSFHKnNCOD9NNrjfHAJFK3HCXwJofX2J+oKY/lWcHEQ6HD8aPyrg== 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 4SPDdR0BZDz19xx; Mon, 6 Nov 2023 14:44:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3A6EiQXp057403; Mon, 6 Nov 2023 14:44:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3A6EiQqi057400; Mon, 6 Nov 2023 14:44:26 GMT (envelope-from git) Date: Mon, 6 Nov 2023 14:44:26 GMT Message-Id: <202311061444.3A6EiQqi057400@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: ccdd8337f9cb - stable/13 - fflush: Split a temporary variable in two. 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ccdd8337f9cbd7d34e2e95df1440dd5f7225d0b4 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ccdd8337f9cbd7d34e2e95df1440dd5f7225d0b4 commit ccdd8337f9cbd7d34e2e95df1440dd5f7225d0b4 Author: Dag-Erling Smørgrav AuthorDate: 2023-08-03 15:08:03 +0000 Commit: Ed Maste CommitDate: 2023-11-06 14:43:41 +0000 fflush: Split a temporary variable in two. It is clearer to avoid reusing temporary variables for different purposes. Sponsored by: Klara, Inc. (cherry picked from commit 1f90b4edffe815aebb35e74b79e10593b31f6b75) (cherry picked from commit 1e99535be2ea9c0ef8bc57fc885e9c01fa95d2dd) --- lib/libc/stdio/fflush.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/stdio/fflush.c b/lib/libc/stdio/fflush.c index a7f9348def50..7ad6adedf53f 100644 --- a/lib/libc/stdio/fflush.c +++ b/lib/libc/stdio/fflush.c @@ -104,10 +104,10 @@ int __sflush(FILE *fp) { unsigned char *p, *old_p; - int n, t, old_w; + int n, f, t, old_w; - t = fp->_flags; - if ((t & __SWR) == 0) + f = fp->_flags; + if ((f & __SWR) == 0) return (0); if ((p = fp->_bf._base) == NULL) @@ -122,7 +122,7 @@ __sflush(FILE *fp) old_p = fp->_p; fp->_p = p; old_w = fp->_w; - fp->_w = t & (__SLBF|__SNBF) ? 0 : fp->_bf._size; + fp->_w = f & (__SLBF|__SNBF) ? 0 : fp->_bf._size; for (; n > 0; n -= t, p += t) { t = _swrite(fp, (char *)p, n);