[PATCH] ipx: correct return type of ipx_map_frame_type

STALE7463d

2 messages, 2 authors, 2006-05-16 · open the first message on its own page

[PATCH] ipx: correct return type of ipx_map_frame_type

From: Alexey Dobriyan <hidden>
Date: 2006-05-16 18:50:58

Casting BE16 to int and back may or may not work. Correct, to be sure.

Signed-off-by: Alexey Dobriyan <redacted>
---
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -944,9 +944,9 @@ out:
 	return rc;
 }
 
-static int ipx_map_frame_type(unsigned char type)
+static __be16 ipx_map_frame_type(unsigned char type)
 {
-	int rc = 0;
+	__be16 rc = 0;
 
 	switch (type) {
 	case IPX_FRAME_ETHERII:	rc = htons(ETH_P_IPX);		break;

Re: [PATCH] ipx: correct return type of ipx_map_frame_type

From: "David S. Miller" <davem@davemloft.net>
Date: 2006-05-16 22:19:03

From: Alexey Dobriyan <redacted>
Date: Tue, 16 May 2006 22:49:40 +0400
Casting BE16 to int and back may or may not work. Correct, to be sure.

Signed-off-by: Alexey Dobriyan <redacted>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help