client: Kill superfluous label "err".
authorAndre Noll <maan@systemlinux.org>
Mon, 6 Dec 2010 22:05:28 +0000 (23:05 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 6 Dec 2010 22:05:28 +0000 (23:05 +0100)
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

index 593cb2c..15dc90f 100644 (file)
@@ -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) {