9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Christos Margiolis <christos@margiolis.net>
To: 9front@9front.org
Subject: [9front] [PATCH] 9/pc/trap.c: Make case fallthrough
Date: Tue, 7 Dec 2021 00:31:58 +0200	[thread overview]
Message-ID: <20211206223158.tuz3mgmwu6axirdt@pleb> (raw)

[-- Attachment #1: Type: text/plain, Size: 71 bytes --]

There is no need to have 2 cases doing the exact same thing.

Christos

[-- Attachment #2.1: Type: text/plain, Size: 305 bytes --]

from postmaster@4ess:
The following attachment had content that we can't
prove to be harmless.  To avoid possible automatic
execution, we changed the content headers.
The original header was:

	Content-Type: text/x-diff; charset=us-ascii
	Content-Disposition: attachment; filename="9trap_fallthrough.diff"

[-- Attachment #2.2: 9trap_fallthrough.diff.suspect --]
[-- Type: application/octet-stream, Size: 414 bytes --]

diff e2a8d3493ab0fdc345b6513a53f30f2b4f36ed97 uncommitted
--- a/sys/src/9/pc/trap.c
+++ b/sys/src/9/pc/trap.c
@@ -39,14 +39,10 @@
 	for(v = 0; v < 256; v++){
 		d1 = (vaddr & 0xFFFF0000)|SEGP;
 		switch(v){
-		case VectorBPT:
-			d1 |= SEGPL(3)|SEGIG;
-			break;
-
+		case VectorBPT: /* FALLTHROUGH */
 		case VectorSYSCALL:
 			d1 |= SEGPL(3)|SEGIG;
 			break;
-
 		default:
 			d1 |= SEGPL(0)|SEGIG;
 			break;


                 reply	other threads:[~2021-12-06 23:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211206223158.tuz3mgmwu6axirdt@pleb \
    --to=christos@margiolis.net \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).