summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorNils Larsch <nils@openssl.org>2006-03-15 17:45:43 +0000
committerNils Larsch <nils@openssl.org>2006-03-15 17:45:43 +0000
commit67b6f1ca889d789e04c58e5b2fbad0944bb1cd1a (patch)
tree9a367d762cfb0e55a2b8d224d8e7e1928089387c /apps
parenta4ff392503fbc9ccd50fb425a69e50a64058314c (diff)
fix problems found by coverity: remove useless code
Diffstat (limited to 'apps')
-rw-r--r--apps/apps.c3
-rw-r--r--apps/engine.c5
-rw-r--r--apps/req.c2
-rw-r--r--apps/rsa.c2
-rw-r--r--apps/s_client.c3
-rw-r--r--apps/s_socket.c2
6 files changed, 2 insertions, 15 deletions
diff --git a/apps/apps.c b/apps/apps.c
index be710a6adb..77ef5df94d 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -1734,10 +1734,7 @@ CA_DB *load_index(char *dbfile, DB_ATTR *db_attr)
goto err;
}
if ((tmpdb = TXT_DB_read(in,DB_NUMBER)) == NULL)
- {
- if (tmpdb != NULL) TXT_DB_free(tmpdb);
goto err;
- }
#ifndef OPENSSL_SYS_VMS
BIO_snprintf(buf[0], sizeof buf[0], "%s.attr", dbfile);
diff --git a/apps/engine.c b/apps/engine.c
index 25c8617107..9a6dc0d822 100644
--- a/apps/engine.c
+++ b/apps/engine.c
@@ -148,11 +148,6 @@ static int util_flags(BIO *bio_out, unsigned int flags, const char *indent)
if(flags & ENGINE_CMD_FLAG_NUMERIC)
{
- if(started)
- {
- BIO_printf(bio_out, "|");
- err = 1;
- }
BIO_printf(bio_out, "NUMERIC");
started = 1;
}
diff --git a/apps/req.c b/apps/req.c
index f58e65ec85..14bb0e0d03 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -797,8 +797,6 @@ bad:
app_RAND_write_file(randfile, bio_err);
- if (pkey == NULL) goto end;
-
if (keyout == NULL)
{
keyout=NCONF_get_string(req_conf,SECTION,KEYFILE);
diff --git a/apps/rsa.c b/apps/rsa.c
index 1e2cd2f0d7..3166c6ad72 100644
--- a/apps/rsa.c
+++ b/apps/rsa.c
@@ -282,7 +282,7 @@ bad:
passin, e, "Private Key");
if (pkey != NULL)
- rsa = pkey == NULL ? NULL : EVP_PKEY_get1_RSA(pkey);
+ rsa = EVP_PKEY_get1_RSA(pkey);
EVP_PKEY_free(pkey);
}
diff --git a/apps/s_client.c b/apps/s_client.c
index 4eac4341c4..fed012230a 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -348,7 +348,7 @@ int MAIN(int, char **);
int MAIN(int argc, char **argv)
{
int off=0;
- SSL *con=NULL,*con2=NULL;
+ SSL *con=NULL;
X509_STORE *store = NULL;
int s,k,width,state=0;
char *cbuf=NULL,*sbuf=NULL,*mbuf=NULL;
@@ -1239,7 +1239,6 @@ shut:
end:
if(prexit) print_stuff(bio_c_out,con,1);
if (con != NULL) SSL_free(con);
- if (con2 != NULL) SSL_free(con2);
if (ctx != NULL) SSL_CTX_free(ctx);
if (cert)
X509_free(cert);
diff --git a/apps/s_socket.c b/apps/s_socket.c
index 4a922e16a0..d9321a0982 100644
--- a/apps/s_socket.c
+++ b/apps/s_socket.c
@@ -231,13 +231,11 @@ static int ssl_sock_init(void)
int init_client(int *sock, char *host, int port, int type)
{
unsigned char ip[4];
- short p=0;
if (!host_ip(host,&(ip[0])))
{
return(0);
}
- if (p != 0) port=p;
return(init_client_ip(sock,ip,port,type));
}