summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-04-15 08:43:48 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-04-15 08:43:48 +0000
commit6585ea45efd718a3ce89e9bd9596a892824f65c8 (patch)
treec0701b7aace45c1d8fff73727934f82e4310828b /usr.bin/ssh
parenteec6fc2cdaf9318e5cd310cf0863d77276d49d0a (diff)
some unused variable and typos; from tomh@po.crl.go.jp
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/dh.c11
-rw-r--r--usr.bin/ssh/sftp-glob.c4
-rw-r--r--usr.bin/ssh/sftp-glob.h4
-rw-r--r--usr.bin/ssh/sftp-int.c8
-rw-r--r--usr.bin/ssh/sshconnect2.c6
-rw-r--r--usr.bin/ssh/sshd.c6
6 files changed, 19 insertions, 20 deletions
diff --git a/usr.bin/ssh/dh.c b/usr.bin/ssh/dh.c
index 982064f54a1..575522ddb5e 100644
--- a/usr.bin/ssh/dh.c
+++ b/usr.bin/ssh/dh.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: dh.c,v 1.13 2001/04/04 23:09:17 markus Exp $");
+RCSID("$OpenBSD: dh.c,v 1.14 2001/04/15 08:43:45 markus Exp $");
#include "xmalloc.h"
@@ -80,10 +80,10 @@ parse_prime(int linenum, char *line, struct dhgroup *dhg)
dhg->g = BN_new();
dhg->p = BN_new();
- if (BN_hex2bn(&dhg->g, gen) < 0)
+ if (BN_hex2bn(&dhg->g, gen) == 0)
goto failclean;
- if (BN_hex2bn(&dhg->p, prime) < 0)
+ if (BN_hex2bn(&dhg->p, prime) == 0)
goto failclean;
if (BN_num_bits(dhg->p) != dhg->size)
@@ -228,15 +228,14 @@ DH *
dh_new_group_asc(const char *gen, const char *modulus)
{
DH *dh;
- int ret;
dh = DH_new();
if (dh == NULL)
fatal("DH_new");
- if ((ret = BN_hex2bn(&dh->p, modulus)) < 0)
+ if (BN_hex2bn(&dh->p, modulus) == 0)
fatal("BN_hex2bn p");
- if ((ret = BN_hex2bn(&dh->g, gen)) < 0)
+ if (BN_hex2bn(&dh->g, gen) == 0)
fatal("BN_hex2bn g");
return (dh);
diff --git a/usr.bin/ssh/sftp-glob.c b/usr.bin/ssh/sftp-glob.c
index 0c3323b3069..18d81c0b0e4 100644
--- a/usr.bin/ssh/sftp-glob.c
+++ b/usr.bin/ssh/sftp-glob.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sftp-glob.c,v 1.4 2001/04/05 10:42:53 markus Exp $");
+RCSID("$OpenBSD: sftp-glob.c,v 1.5 2001/04/15 08:43:46 markus Exp $");
#include <glob.h>
@@ -129,7 +129,7 @@ int fudge_stat(const char *path, struct stat *st)
int
remote_glob(int fd_in, int fd_out, const char *pattern, int flags,
- const int (*errfunc)(const char *, int), glob_t *pglob)
+ int (*errfunc)(const char *, int), glob_t *pglob)
{
pglob->gl_opendir = (void*)fudge_opendir;
pglob->gl_readdir = (void*)fudge_readdir;
diff --git a/usr.bin/ssh/sftp-glob.h b/usr.bin/ssh/sftp-glob.h
index 944f3286506..4206af43976 100644
--- a/usr.bin/ssh/sftp-glob.h
+++ b/usr.bin/ssh/sftp-glob.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-glob.h,v 1.2 2001/04/05 10:42:53 markus Exp $ */
+/* $OpenBSD: sftp-glob.h,v 1.3 2001/04/15 08:43:46 markus Exp $ */
/*
* Copyright (c) 2001 Damien Miller. All rights reserved.
@@ -28,5 +28,5 @@
int
remote_glob(int fd_in, int fd_out, const char *pattern, int flags,
- const int (*errfunc)(const char *, int), glob_t *pglob);
+ int (*errfunc)(const char *, int), glob_t *pglob);
diff --git a/usr.bin/ssh/sftp-int.c b/usr.bin/ssh/sftp-int.c
index 2584c818f8a..3a71daac4cb 100644
--- a/usr.bin/ssh/sftp-int.c
+++ b/usr.bin/ssh/sftp-int.c
@@ -26,7 +26,7 @@
/* XXX: recursive operations */
#include "includes.h"
-RCSID("$OpenBSD: sftp-int.c,v 1.35 2001/04/12 23:17:54 mouring Exp $");
+RCSID("$OpenBSD: sftp-int.c,v 1.36 2001/04/15 08:43:46 markus Exp $");
#include <glob.h>
@@ -148,7 +148,7 @@ help(void)
void
local_do_shell(const char *args)
{
- int ret, status;
+ int status;
char *shell;
pid_t pid;
@@ -165,10 +165,10 @@ local_do_shell(const char *args)
/* XXX: child has pipe fds to ssh subproc open - issue? */
if (args) {
debug3("Executing %s -c \"%s\"", shell, args);
- ret = execl(shell, shell, "-c", args, NULL);
+ execl(shell, shell, "-c", args, NULL);
} else {
debug3("Executing %s", shell);
- ret = execl(shell, shell, NULL);
+ execl(shell, shell, NULL);
}
fprintf(stderr, "Couldn't execute \"%s\": %s\n", shell,
strerror(errno));
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index 9a1d2576e1f..4acdd017172 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/sshconnect2.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect2.c,v 1.68 2001/04/12 19:15:25 markus Exp $");
+RCSID("$OpenBSD: sshconnect2.c,v 1.69 2001/04/15 08:43:47 markus Exp $");
#include <openssl/bn.h>
#include <openssl/md5.h>
@@ -358,7 +358,7 @@ input_userauth_pk_ok(int type, int plen, void *ctxt)
Authctxt *authctxt = ctxt;
Key *key = NULL;
Buffer b;
- int alen, blen, pktype, sent = 0;
+ int alen, blen, sent = 0;
char *pkalg, *pkblob, *fp;
if (authctxt == NULL)
@@ -386,7 +386,7 @@ input_userauth_pk_ok(int type, int plen, void *ctxt)
debug("no last key or no sign cb");
break;
}
- if ((pktype = key_type_from_name(pkalg)) == KEY_UNSPEC) {
+ if (key_type_from_name(pkalg) == KEY_UNSPEC) {
debug("unknown pkalg %s", pkalg);
break;
}
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index 661678c2837..db39d929e2a 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.193 2001/04/12 20:09:38 stevesk Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.194 2001/04/15 08:43:47 markus Exp $");
#include <openssl/dh.h>
#include <openssl/bn.h>
@@ -780,9 +780,9 @@ main(int ac, char **av)
/* Start listening for a socket, unless started from inetd. */
if (inetd_flag) {
- int s1, s2;
+ int s1;
s1 = dup(0); /* Make sure descriptors 0, 1, and 2 are in use. */
- s2 = dup(s1);
+ dup(s1);
sock_in = dup(0);
sock_out = dup(1);
startup_pipe = -1;