From nobody Mon Nov 06 14:42:11 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 4SPDZq6KqTz4yqjv; Mon, 6 Nov 2023 14:42:11 +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 4SPDZq5q7mz3Ld3; Mon, 6 Nov 2023 14:42:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699281731; 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=I1oGjSvpVWvKAW0O7OjuEJ7s+70t0ODqg5jlvVC6JO8=; b=dxpjmDFkSa6IrWi4XSCCb6h1LApNkhULkpjvSvo/E2HDzf6oM9h+uek9CF6vTYMQ8JP94t F/tFu9rvgEmkOtAkh6h24GCO9qwn94mnHOqh0QyrthbVHz/4nevEgRI+/znOKjNNZQpXdU E3I0KWBE6AoipEnl0YkhoBzNQ+Xji4v3fSTqQ1C7jDVxorx8DQfglHVuXkx//pUX+R85t9 X3DHu7haTnLy4VvUKoGWmDHCQLW0ts2VCwcmSBGv9c7q4UNSZpHxfIF9tu6AlljaICpks5 2LqFboAloS/jJ+ehLJZd9VBIDRKFaC3sQbz0n/xIZhHU8IjfPudfuBWfSCWsEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699281731; 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=I1oGjSvpVWvKAW0O7OjuEJ7s+70t0ODqg5jlvVC6JO8=; b=cCRBcJ8kx0JZlt81hzorrnFysf5pXgy5fsYKANCBDcbMFKg6H6QENhjMU4LSbovA/ui1zi YM45Pc4q+KKdBu/pflnJAuDB0PT2Q6KG9xqV5ez2+M7fXlxBwu33kGMVDaF1B1WdwKCcBv AkivwZ7LLjcCwxiRMz+jEgECg5K0JVxEC5C6MYmexZMFlxqIuiV1ee4a6BCL0N0cC45GIk 35l0MYrNhD9DZkBk47YOsxVT0/6AztVJzRni1jx+fRNxe1+CLd1HXeYWfCRhqqJXyhP3VR CioVFZEVhf5iV0cDOV8j56RwSmLB1cOjL2Ag8Qaiz9e1gEmwXm2PrTBuF+k4eQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699281731; a=rsa-sha256; cv=none; b=K6FAund9HGMwuYpsFmB/sRSOT1Vy2HdqvAo56/GG9AWmzEblOG0SaniolK1WWRBpzLyAqm d0CWjR6rKdsmdHCkr0S/FU8GLD4MpXT8nkPF+RlohqL8P/6m6e6fYXcqCC3hfNkfM5lBSf AylIcc6FSv78qtuItw9iqg3o5NJs/28hz9Ip4wcSk+TNuq5icRB2x0vgPOwCFKrhMGvf+R zL+nD93U1M0uuy3AMzeFTSVJuJB3JOc8SAhNZGblBbl1qAyDju8cUqZU0zgXZhdUJflncQ 1L1ipBmTbfPZ8SfnX5rt79D22b7a1fEYq9PLRUNgbOPm1OBUp2Ungmzge3rRDg== 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 4SPDZq4tPZz19Rr; Mon, 6 Nov 2023 14:42:11 +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 3A6EgB4d055762; Mon, 6 Nov 2023 14:42:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3A6EgBKk055759; Mon, 6 Nov 2023 14:42:11 GMT (envelope-from git) Date: Mon, 6 Nov 2023 14:42:11 GMT Message-Id: <202311061442.3A6EgBKk055759@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: 1e99535be2ea - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 1e99535be2ea9c0ef8bc57fc885e9c01fa95d2dd Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1e99535be2ea9c0ef8bc57fc885e9c01fa95d2dd commit 1e99535be2ea9c0ef8bc57fc885e9c01fa95d2dd Author: Dag-Erling Smørgrav AuthorDate: 2023-08-03 15:08:03 +0000 Commit: Ed Maste CommitDate: 2023-11-06 14:41:54 +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) --- 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);