git: ccdd8337f9cb - stable/13 - fflush: Split a temporary variable in two.

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Mon, 06 Nov 2023 14:44:26 UTC
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 <des@FreeBSD.org>
AuthorDate: 2023-08-03 15:08:03 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
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);