Plan 9 from Bell Labs’s /usr/web/sources/contrib/mospak/abaco-modern/abaco-wind-dangling-edit.patch

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


abaco: remove stray fragment at wind.c:39

wininit at wind.c:39 has an incomplete statement — a lone `w->url.`
dangling on its own line between the textinit call for w->url and
the line that sets w->url.what:

	textinit(&w->url, screen, r1, font, tagcols);
	w->url.
	w->url.what = Urltag;

The code happens to compile because the C tokenizer permits
whitespace across the `.` operator, so lines 39 and 40 are glued
into a single statement:

	w->url.w->url.what = Urltag;

That evaluates correctly today because w->url.w was set to w on
line 23 (w->url.w = w;), turning the extra indirection into an
identity.  But it is clearly a copy-paste leftover, not intended
code — the other three back-pointer assignments in the same
function (tag, page, status) don't have an analogous dangling
fragment after their textinit calls.

Delete the spurious line.  No behaviour change.  Source-readability
fix only.

RFC relevance: none

--- sys/src/cmd/abaco/wind.c
+++ sys/src/cmd/abaco/wind.c
@@ -36,7 +36,6 @@
 	r1.min.y = r1.max.y;
 	r1.max.y += font->height;
 	textinit(&w->url, screen, r1, font, tagcols);
-	w->url.
 	w->url.what = Urltag;
 	r1.min.y = r1.max.y++;
 	draw(screen, r1, tagcols[BORD], nil, ZP);

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.