Skip to contentSkip to conversation

Missing break in switch statement.

PATCH In review [email protected] 3 participants 3 messages Aug 11, 2003 – Aug 12, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Missing break in switch statement.

Is this intentional? It should at least have a
/* FALLTHROUGH */ or similar if so.

Dave

net/ipv6/raw.c +1 -0
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/net/ipv6/raw.c linux-2.5/net/ipv6/raw.c
@@ -833,6 +833,7 @@ static int rawv6_getsockopt(struct sock 
 			val = -1;
 		else
 			val = opt->offset;
+		break;
 
 	default:
 		return -ENOPROTOOPT;
#1 lore raw

In article <E19mFqr-00068T-00@tetrachloride> (at Mon, 11 Aug 2003 17:48:57 +0100), [email protected] says:

Quoted 2 lines

Is this intentional? It should at least have a
/* FALLTHROUGH */ or similar if so.

Of course not.

net/ipv6/raw.c static int rawv6_getsockopt(struct sock · line 839

Quoted 6 lines
net/ipv6/raw.c +1 -0
 		else
 			val = opt->offset;
+		break;
 
 	default:
 		return -ENOPROTOOPT;

agreed.

--yoshfuji

#2 lore raw
Quoted 6 lines · On Tue, 12 Aug 2003 02:14:14 +0900 (JST) YOSHIFUJI Hideaki…

In article <E19mFqr-00068T-00@tetrachloride> (at Mon, 11 Aug 2003 17:48:57 +0100), [email protected] says:

Quoted 2 lines

Is this intentional? It should at least have a
/* FALLTHROUGH */ or similar if so.

Of course not.

Patch applied, thanks David.