summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2019-07-07 01:05:01 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2019-07-07 01:05:01 +0000
commitec402c9a990b4f7a0a07b40d50fbd08f26ffbd93 (patch)
treeb3b76e503319c0c32d44ed25c64f5c8e2c645cf9 /usr.bin
parentfb1e773134ae883a3d9344562b321530b4214225 (diff)
Remove some set but never used variables. ok daraadt@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/channels.c5
-rw-r--r--usr.bin/ssh/hostfile.c5
-rw-r--r--usr.bin/ssh/sshbuf-misc.c5
-rw-r--r--usr.bin/ssh/sshconnect2.c9
-rw-r--r--usr.bin/ssh/sshkey.c6
5 files changed, 12 insertions, 18 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index ad4f20984b8..5450eea26d2 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.393 2019/06/28 13:35:04 deraadt Exp $ */
+/* $OpenBSD: channels.c,v 1.394 2019/07/07 01:05:00 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -3244,7 +3244,6 @@ channel_input_status_confirm(int type, u_int32_t seq, struct ssh *ssh)
int id = channel_parse_id(ssh, __func__, "status confirm");
Channel *c;
struct channel_confirm *cc;
- int r;
/* Reset keepalive timeout */
ssh_packet_set_alive_timeouts(ssh, 0);
@@ -3257,7 +3256,7 @@ channel_input_status_confirm(int type, u_int32_t seq, struct ssh *ssh)
}
if (channel_proxy_upstream(c, type, seq, ssh))
return 0;
- if ((r = sshpkt_get_end(ssh)) != 0)
+ if (sshpkt_get_end(ssh) != 0)
ssh_packet_disconnect(ssh, "Invalid status confirm message");
if ((cc = TAILQ_FIRST(&c->status_confirms)) == NULL)
return 0;
diff --git a/usr.bin/ssh/hostfile.c b/usr.bin/ssh/hostfile.c
index fd020cdae72..752a2c1e13c 100644
--- a/usr.bin/ssh/hostfile.c
+++ b/usr.bin/ssh/hostfile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hostfile.c,v 1.75 2019/06/28 01:23:50 deraadt Exp $ */
+/* $OpenBSD: hostfile.c,v 1.76 2019/07/07 01:05:00 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -160,13 +160,12 @@ int
hostfile_read_key(char **cpp, u_int *bitsp, struct sshkey *ret)
{
char *cp;
- int r;
/* Skip leading whitespace. */
for (cp = *cpp; *cp == ' ' || *cp == '\t'; cp++)
;
- if ((r = sshkey_read(ret, &cp)) != 0)
+ if (sshkey_read(ret, &cp) != 0)
return 0;
/* Skip trailing whitespace. */
diff --git a/usr.bin/ssh/sshbuf-misc.c b/usr.bin/ssh/sshbuf-misc.c
index 5ac8edc4c2a..7251630de8a 100644
--- a/usr.bin/ssh/sshbuf-misc.c
+++ b/usr.bin/ssh/sshbuf-misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshbuf-misc.c,v 1.6 2016/05/02 08:49:03 djm Exp $ */
+/* $OpenBSD: sshbuf-misc.c,v 1.7 2019/07/07 01:05:00 dtucker Exp $ */
/*
* Copyright (c) 2011 Damien Miller
*
@@ -91,14 +91,13 @@ sshbuf_dtob64(struct sshbuf *buf)
size_t len = sshbuf_len(buf), plen;
const u_char *p = sshbuf_ptr(buf);
char *ret;
- int r;
if (len == 0)
return strdup("");
plen = ((len + 2) / 3) * 4 + 1;
if (SIZE_MAX / 2 <= len || (ret = malloc(plen)) == NULL)
return NULL;
- if ((r = b64_ntop(p, len, ret, plen)) == -1) {
+ if (b64_ntop(p, len, ret, plen) == -1) {
explicit_bzero(ret, plen);
free(ret);
return NULL;
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index 0ccf0fb2646..5c33a74ad31 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/sshconnect2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.306 2019/06/28 13:35:04 deraadt Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.307 2019/07/07 01:05:00 dtucker Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -562,14 +562,13 @@ input_userauth_failure(int type, u_int32_t seq, struct ssh *ssh)
Authctxt *authctxt = ssh->authctxt;
char *authlist = NULL;
u_char partial;
- int r;
if (authctxt == NULL)
fatal("input_userauth_failure: no authentication context");
- if ((r = sshpkt_get_cstring(ssh, &authlist, NULL)) != 0 ||
- (r = sshpkt_get_u8(ssh, &partial)) != 0 ||
- (r = sshpkt_get_end(ssh)) != 0)
+ if (sshpkt_get_cstring(ssh, &authlist, NULL) != 0 ||
+ sshpkt_get_u8(ssh, &partial) != 0 ||
+ sshpkt_get_end(ssh) != 0)
goto out;
if (partial != 0) {
diff --git a/usr.bin/ssh/sshkey.c b/usr.bin/ssh/sshkey.c
index 5cd2c919260..597bd281ca8 100644
--- a/usr.bin/ssh/sshkey.c
+++ b/usr.bin/ssh/sshkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.c,v 1.78 2019/06/27 06:29:35 djm Exp $ */
+/* $OpenBSD: sshkey.c,v 1.79 2019/07/07 01:05:00 dtucker Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Alexander von Gernler. All rights reserved.
@@ -920,7 +920,6 @@ fingerprint_b64(const char *alg, u_char *dgst_raw, size_t dgst_raw_len)
char *ret;
size_t plen = strlen(alg) + 1;
size_t rlen = ((dgst_raw_len + 2) / 3) * 4 + plen + 1;
- int r;
if (dgst_raw_len > 65536 || (ret = calloc(1, rlen)) == NULL)
return NULL;
@@ -928,8 +927,7 @@ fingerprint_b64(const char *alg, u_char *dgst_raw, size_t dgst_raw_len)
strlcat(ret, ":", rlen);
if (dgst_raw_len == 0)
return ret;
- if ((r = b64_ntop(dgst_raw, dgst_raw_len,
- ret + plen, rlen - plen)) == -1) {
+ if (b64_ntop(dgst_raw, dgst_raw_len, ret + plen, rlen - plen) == -1) {
freezero(ret, rlen);
return NULL;
}