upstream: Remove some set but never used variables. ok daraadt@
OpenBSD-Commit-ID: 824baf9c59afc66a4637017e397b9b74a41684e7
diff --git a/channels.c b/channels.c
index e1c7be8..47521d3 100644
--- a/channels.c
+++ b/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
@@ -3277,7 +3277,6 @@
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);
@@ -3290,7 +3289,7 @@
}
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/hostfile.c b/hostfile.c
index 6a2a3d0..389aae1 100644
--- a/hostfile.c
+++ b/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
@@ -163,13 +163,12 @@
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/sshbuf-misc.c b/sshbuf-misc.c
index 15dcfbc..a077a01 100644
--- a/sshbuf-misc.c
+++ b/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
*
@@ -95,14 +95,13 @@
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/sshconnect2.c b/sshconnect2.c
index 0ad44ce..cb8d219 100644
--- a/sshconnect2.c
+++ b/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.
@@ -570,14 +570,13 @@
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/sshkey.c b/sshkey.c
index 5d28c45..6b5ff04 100644
--- a/sshkey.c
+++ b/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.
@@ -950,7 +950,6 @@
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;
@@ -958,8 +957,7 @@
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;
}