From nobody Fri Nov 03 17:38:33 2023 X-Original-To: dev-commits-src-main@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 4SMSdk0gl8z4ywSw; Fri, 3 Nov 2023 17:38:34 +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 4SMSdj74ymz4cWs; Fri, 3 Nov 2023 17:38:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699033114; 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=wRbrdPno7b9gXkHrPJWgHlGc6MJE9/XJC+wtjOEwdHk=; b=cHUHmSAb3NEYLZsN8A8rLHPOYrA0KCt6U4qNXJqq9mSZpr+Ncf3ZoKrZkA9FB7U4F/0mCK x+m9fl12WgCCw8NQikVw5GUwSrYp3QzJeVq1/K5Gc4t2H3WuNCK6CXBUTO61C9DOyBwrBi oKNWfeQVRm3legWTPIzejSze5PXm8+VAkfDuudhfJv0hRKIVcyfFWuIai6752GAbWVCb4G eLm0RRpQzn2bf6cDSMuTpAqaPjQn8CyfOtDKTep/izfovKBPBjLRuKgKopYiVehiDHlVax Sqtr5PelOecEgAJEha+Jb7fihqaHKYmZLF0kIbYIIDQ/zF7jiwzSxRguQ1k9iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699033114; 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=wRbrdPno7b9gXkHrPJWgHlGc6MJE9/XJC+wtjOEwdHk=; b=gdlVZiyEdJsCRlPk1y9GaLtEBI9mXNn3xGQV4g7e79kiXtyE5GjhebcQ6SSX16zfnjs2od Jh9znAEvKgf6LcWc9x8ZpA2FKT8aqiN3q31Jukiy596GGzOgsAn97wYRAfMnTNbxQngjM4 dFkb/lav3dYyJLGyBDoW5u0hYH6OLaxcPwTss91ZNwNsJOp9Iia18TQlny1fwG7rzKlGQ/ W5Q70diNX+Okzlk7hapKW4+x8JNusWbhjtUG/wiNYC8izWt3GnRnSIoHde8sItgfEfmh61 OruUXC3euYX/j9Dri3b/WgiKAkc5bjnS7pTirCQjobm2Qb6XY/ouNPAUi90z5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699033114; a=rsa-sha256; cv=none; b=Uu3VTbE6hItuXBHpm6B7YEHIp1ZfTPTfdhLpd+njqCYuJCLxm8vvDVL4fXnlkme/AAJLyp 3HqCxClb7VV4JVuRQS19BQ/oajlK3qY/J+6jwAhwjv3llGmtkYOUVtFe0wq+XUQTnoiBU/ hzKGYjaa62iynLCVm1z0tiwjv+6qn839kFlxIkkbLgWI7MKsfYQdC8Cjv8GjHasZFIMjwT KhI+Y8+cznrsOtT2S6yBwFnm0mvxx7tGRozb0evp4TswOF0rOWSYljvTme4yZ+xNtRhJPv /TTVwpT6GU4uoTjFZl/LHjdK+424jlh7gVg5B9GBBau4tQjAUwxITzeCBe1pJQ== 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 4SMSdj6B7Sz82y; Fri, 3 Nov 2023 17:38:33 +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 3A3HcX5I030464; Fri, 3 Nov 2023 17:38:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3A3HcXIV030461; Fri, 3 Nov 2023 17:38:33 GMT (envelope-from git) Date: Fri, 3 Nov 2023 17:38:33 GMT Message-Id: <202311031738.3A3HcXIV030461@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 1f90b4edffe8 - main - fflush: Split a temporary variable in two. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 1f90b4edffe815aebb35e74b79e10593b31f6b75 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1f90b4edffe815aebb35e74b79e10593b31f6b75 commit 1f90b4edffe815aebb35e74b79e10593b31f6b75 Author: Dag-Erling Smørgrav AuthorDate: 2023-08-03 15:08:03 +0000 Commit: Ed Maste CommitDate: 2023-11-03 17:38:12 +0000 fflush: Split a temporary variable in two. It is clearer to avoid reusing temporary variables for different purposes. Sponsored by: Klara, Inc. --- 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 30bbd1371ff9..c658fbec697d 100644 --- a/lib/libc/stdio/fflush.c +++ b/lib/libc/stdio/fflush.c @@ -103,10 +103,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) @@ -121,7 +121,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);