summaryrefslogtreecommitdiffstats
path: root/net/llc/llc_c_ac.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-09-22 03:38:15 -0300
committerArnaldo Carvalho de Melo <acme@mandriva.com>2005-09-22 03:38:15 -0300
commitbdcc66cca89cc2e97e93054d139b2e9a2b2ec1a7 (patch)
treeb63038631b65b0ed00366bc6bd74c5700f1bc8b3 /net/llc/llc_c_ac.c
parent1d67e6501b8dba54ef8dcabebe2ad049b8ad0d67 (diff)
downloadlinux-bdcc66cca89cc2e97e93054d139b2e9a2b2ec1a7.tar.gz
linux-bdcc66cca89cc2e97e93054d139b2e9a2b2ec1a7.tar.bz2
linux-bdcc66cca89cc2e97e93054d139b2e9a2b2ec1a7.zip
[LLC]: Simplify llc_c_ac code, removing unneeded assignments to variables
Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/llc/llc_c_ac.c')
-rw-r--r--net/llc/llc_c_ac.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/net/llc/llc_c_ac.c b/net/llc/llc_c_ac.c
index db98ea2113a5..309c5682e58d 100644
--- a/net/llc/llc_c_ac.c
+++ b/net/llc/llc_c_ac.c
@@ -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;
} else if (ev->type == LLC_CONN_EV_TYPE_ACK_TMR)
reason = LLC_DISC_REASON_ACK_TMR_EXP;
- else {
- reason = 0;
+ else
rc = -EINVAL;
- }
if (!rc) {
ev->reason = reason;
ev->ind_prim = LLC_DISC_PRIM;
@@ -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) {
reason = LLC_RESET_REASON_REMOTE;
rc = 0;
- } else {
- reason = 0;
- rc = 1;
}
break;
case LLC_CONN_EV_TYPE_ACK_TMR:
@@ -172,8 +167,7 @@ int llc_conn_ac_rst_ind(struct sock *sk, struct sk_buff *skb)
if (llc->retry_count > llc->n2) {
reason = LLC_RESET_REASON_LOCAL;
rc = 0;
- } else
- rc = 1;
+ }
break;
}
if (!rc) {