Index | Thread | Search

From:
Walter Alejandro Iglesias <wai@roquesor.com>
Subject:
Re: vi(1), removing unused variables
To:
Theo Buehler <tb@theobuehler.org>
Cc:
Claudio Jeker <cjeker@diehard.n-r-g.com>, tech@openbsd.org
Date:
Mon, 20 Apr 2026 13:27:34 +0200

Download raw body.

Thread
On Mon, Apr 20, 2026 at 12:32:00PM +0200, Theo Buehler wrote:
> > Since we're at it, how about we remove trailing white spaces?
> 
> I have landed a similar, more extensive diff.
> 
> In general, I would recommend not sending large whitespace-only diffs.

One more and we won't bother anymore. :-)

Index: common/screen.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/common/screen.c,v
diff -u -p -u -p -r1.14 screen.c
--- common/screen.c	18 Apr 2017 01:45:35 -0000	1.14
+++ common/screen.c	20 Apr 2026 11:25:29 -0000
@@ -131,8 +131,8 @@ screen_end(SCR *sp)
 	SCR *tsp;
 
 	/* If multiply referenced, just decrement the count and return. */
-	 if (--sp->refcnt != 0)
-		 return (0);
+	if (--sp->refcnt != 0)
+		return (0);
 
 	/*
 	 * Remove the screen from the displayed and hidden queues.


-- 
Walter