From 657bc58454768ed9a6848d356983a5ad173b4255 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 6 Dec 2010 23:05:28 +0100 Subject: [PATCH] client: Kill superfluous label "err". The position of this label is identical to the "out" label, and "out" is more to the point as we jump there not only in case of an error. So jump always to "out" and remove the "err" label. --- client_common.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/client_common.c b/client_common.c index 593cb2c0..15dc90f1 100644 --- a/client_common.c +++ b/client_common.c @@ -170,7 +170,7 @@ static void client_post_select(struct sched *s, struct task *t) return; ret = send_buffer(ct->rc4c.fd, buf); if (ret < 0) - goto err; + goto out; ct->status = CL_SENT_AUTH; return; case CL_SENT_AUTH: @@ -191,7 +191,7 @@ static void client_post_select(struct sched *s, struct task *t) ret = para_decrypt_buffer(ct->key_file, crypt_buf, (unsigned char *)buf, n); if (ret < 0) - goto err; + goto out; sha1_hash((char *)crypt_buf, CHALLENGE_SIZE, challenge_sha1); RC4_set_key(&ct->rc4c.send_key, RC4_KEY_LEN, crypt_buf + CHALLENGE_SIZE); @@ -202,7 +202,7 @@ static void client_post_select(struct sched *s, struct task *t) ret = send_bin_buffer(ct->rc4c.fd, (char *)challenge_sha1, HASH_SIZE); if (ret < 0) - goto err; + goto out; ct->status = CL_SENT_CH_RESPONSE; return; } @@ -237,7 +237,7 @@ static void client_post_select(struct sched *s, struct task *t) ret = rc4_send_buffer(&ct->rc4c, command); free(command); if (ret < 0) - goto err; + goto out; ct->status = CL_SENT_COMMAND; return; } @@ -265,7 +265,7 @@ static void client_post_select(struct sched *s, struct task *t) size_t sz; ret = btr_node_status(btrn, 0, BTR_NT_LEAF); if (ret < 0) - goto err; + goto out; if (ret == 0) return; if (!FD_ISSET(ct->rc4c.fd, &s->wfds)) @@ -273,7 +273,7 @@ static void client_post_select(struct sched *s, struct task *t) sz = btr_next_buffer(btrn, &buf2); ret = rc4_send_bin_buffer(&ct->rc4c, buf2, sz); if (ret < 0) - goto err; + goto out; btr_consume(btrn, sz); return; } @@ -282,7 +282,7 @@ static void client_post_select(struct sched *s, struct task *t) char *buf2; ret = btr_node_status(btrn, 0, BTR_NT_ROOT); if (ret < 0) - goto err; + goto out; if (ret == 0) return; /* @@ -301,7 +301,6 @@ static void client_post_select(struct sched *s, struct task *t) goto out; } } -err: out: t->error = ret; if (ret < 0) { -- 2.39.5