diff options
Diffstat (limited to 'net/decnet/dn_nsp_in.c')
-rw-r--r-- | net/decnet/dn_nsp_in.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/decnet/dn_nsp_in.c b/net/decnet/dn_nsp_in.c index 72ecc6e62ec4..7683d4f754d2 100644 --- a/net/decnet/dn_nsp_in.c +++ b/net/decnet/dn_nsp_in.c | |||
@@ -360,9 +360,9 @@ static void dn_nsp_conn_conf(struct sock *sk, struct sk_buff *skb) | |||
360 | scp->max_window = decnet_no_fc_max_cwnd; | 360 | scp->max_window = decnet_no_fc_max_cwnd; |
361 | 361 | ||
362 | if (skb->len > 0) { | 362 | if (skb->len > 0) { |
363 | unsigned char dlen = *skb->data; | 363 | u16 dlen = *skb->data; |
364 | if ((dlen <= 16) && (dlen <= skb->len)) { | 364 | if ((dlen <= 16) && (dlen <= skb->len)) { |
365 | scp->conndata_in.opt_optl = dn_htons((__u16)dlen); | 365 | scp->conndata_in.opt_optl = dn_htons(dlen); |
366 | memcpy(scp->conndata_in.opt_data, skb->data + 1, dlen); | 366 | memcpy(scp->conndata_in.opt_data, skb->data + 1, dlen); |
367 | } | 367 | } |
368 | } | 368 | } |
@@ -404,9 +404,9 @@ static void dn_nsp_disc_init(struct sock *sk, struct sk_buff *skb) | |||
404 | memset(scp->discdata_in.opt_data, 0, 16); | 404 | memset(scp->discdata_in.opt_data, 0, 16); |
405 | 405 | ||
406 | if (skb->len > 0) { | 406 | if (skb->len > 0) { |
407 | unsigned char dlen = *skb->data; | 407 | u16 dlen = *skb->data; |
408 | if ((dlen <= 16) && (dlen <= skb->len)) { | 408 | if ((dlen <= 16) && (dlen <= skb->len)) { |
409 | scp->discdata_in.opt_optl = dn_htons((__u16)dlen); | 409 | scp->discdata_in.opt_optl = dn_htons(dlen); |
410 | memcpy(scp->discdata_in.opt_data, skb->data + 1, dlen); | 410 | memcpy(scp->discdata_in.opt_data, skb->data + 1, dlen); |
411 | } | 411 | } |
412 | } | 412 | } |