linux-mips
[Top] [All Lists]

net/dccp: expansion of error code size

To: "David S. Miller" <davem@davemloft.net>
Subject: net/dccp: expansion of error code size
From: Yoichi Yuasa <yuasa@linux-mips.org>
Date: Mon, 24 May 2010 15:45:08 +0900
Cc: yuasa@linux-mips.org, linux-mips <linux-mips@linux-mips.org>, netdev <netdev@vger.kernel.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:message-id:x-mailer:mime-version:content-type :content-transfer-encoding; bh=6kngJtcj59Bhv9z7uc6saT8SauO+83PKZIQb9Or6b/g=; b=uCEJFhNrpSccHy+LLecILjmGOYdkI+K5+I5yMjczrKJacmCz36SS3//DYKWLPncWBy mtrtwF/QQUS1DLtOu/OJmAOwUIvpl6MDgZdnyrn/95WGTKjIJMD6FpnfC/lXFSB/AYTn KRmh+xvpJZPf7/YPtQ+0Qin1vJZcExX2PEfZg=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; b=AI/aklckRtiw7S/eWnB7cKrFCAauX3WLrPujY/a7fhNqKHXUVipHcrQR1KhklG6PBd wQ/FWp7ZRoXFgafnHfuy0uP5HN1BFEknHtK0MzkiHoBcOHDcQxGxn2XmwAA+Cehplhdq +qE8fCVDjr72NHGMaXqYxsz8+15H9g7MmIUV4=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Because MIPS's EDQUOT value is 1133(0x46d).
It's larger than u8.

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
---
 net/dccp/input.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/dccp/input.c b/net/dccp/input.c
index 58f7bc1..6beb6a7 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -124,9 +124,9 @@ static int dccp_rcv_closereq(struct sock *sk, struct 
sk_buff *skb)
        return queued;
 }
 
-static u8 dccp_reset_code_convert(const u8 code)
+static u16 dccp_reset_code_convert(const u8 code)
 {
-       const u8 error_code[] = {
+       const u16 error_code[] = {
        [DCCP_RESET_CODE_CLOSED]             = 0,       /* normal termination */
        [DCCP_RESET_CODE_UNSPECIFIED]        = 0,       /* nothing known */
        [DCCP_RESET_CODE_ABORTED]            = ECONNRESET,
@@ -148,7 +148,7 @@ static u8 dccp_reset_code_convert(const u8 code)
 
 static void dccp_rcv_reset(struct sock *sk, struct sk_buff *skb)
 {
-       u8 err = dccp_reset_code_convert(dccp_hdr_reset(skb)->dccph_reset_code);
+       u16 err = 
dccp_reset_code_convert(dccp_hdr_reset(skb)->dccph_reset_code);
 
        sk->sk_err = err;
 
-- 
1.7.1


<Prev in Thread] Current Thread [Next in Thread>