[LLC]: Simplify llc_c_ac code, removing unneeded assignments to variables

Signed-off-by: default avatarJochen Friedrich <jochen@scram.de>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
parent 1d67e650
...@@ -120,10 +120,8 @@ int llc_conn_ac_disc_ind(struct sock *sk, struct sk_buff *skb) ...@@ -120,10 +120,8 @@ int llc_conn_ac_disc_ind(struct sock *sk, struct sk_buff *skb)
reason = LLC_DISC_REASON_RX_DISC_CMD_PDU; reason = LLC_DISC_REASON_RX_DISC_CMD_PDU;
} else if (ev->type == LLC_CONN_EV_TYPE_ACK_TMR) } else if (ev->type == LLC_CONN_EV_TYPE_ACK_TMR)
reason = LLC_DISC_REASON_ACK_TMR_EXP; reason = LLC_DISC_REASON_ACK_TMR_EXP;
else { else
reason = 0;
rc = -EINVAL; rc = -EINVAL;
}
if (!rc) { if (!rc) {
ev->reason = reason; ev->reason = reason;
ev->ind_prim = LLC_DISC_PRIM; ev->ind_prim = LLC_DISC_PRIM;
...@@ -160,9 +158,6 @@ int llc_conn_ac_rst_ind(struct sock *sk, struct sk_buff *skb) ...@@ -160,9 +158,6 @@ int llc_conn_ac_rst_ind(struct sock *sk, struct sk_buff *skb)
LLC_U_PDU_CMD(pdu) == LLC_2_PDU_CMD_SABME) { LLC_U_PDU_CMD(pdu) == LLC_2_PDU_CMD_SABME) {
reason = LLC_RESET_REASON_REMOTE; reason = LLC_RESET_REASON_REMOTE;
rc = 0; rc = 0;
} else {
reason = 0;
rc = 1;
} }
break; break;
case LLC_CONN_EV_TYPE_ACK_TMR: case LLC_CONN_EV_TYPE_ACK_TMR:
...@@ -172,8 +167,7 @@ int llc_conn_ac_rst_ind(struct sock *sk, struct sk_buff *skb) ...@@ -172,8 +167,7 @@ int llc_conn_ac_rst_ind(struct sock *sk, struct sk_buff *skb)
if (llc->retry_count > llc->n2) { if (llc->retry_count > llc->n2) {
reason = LLC_RESET_REASON_LOCAL; reason = LLC_RESET_REASON_LOCAL;
rc = 0; rc = 0;
} else }
rc = 1;
break; break;
} }
if (!rc) { if (!rc) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment