aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pluto/db_ops.c11
-rw-r--r--src/pluto/ipsec_doi.c1
-rw-r--r--src/pluto/pgp.c2
-rw-r--r--src/pluto/pkcs1.c2
-rw-r--r--src/pluto/plutomain.c1
5 files changed, 6 insertions, 11 deletions
diff --git a/src/pluto/db_ops.c b/src/pluto/db_ops.c
index ed903e92f..ddb54dcdb 100644
--- a/src/pluto/db_ops.c
+++ b/src/pluto/db_ops.c
@@ -129,8 +129,6 @@ static __inline__ void *malloc_bytes_st(size_t size, struct db_ops_stats *st)
int
db_prop_init(struct db_context *ctx, u_int8_t protoid, int max_trans, int max_attrs)
{
- int ret=-1;
-
ctx->trans0 = NULL;
ctx->attrs0 = NULL;
@@ -145,12 +143,7 @@ db_prop_init(struct db_context *ctx, u_int8_t protoid, int max_trans, int max_at
db_attrs_st);
memset(ctx->attrs0, '\0', sizeof(struct db_attr) * max_attrs);
}
- ret = 0;
-out:
- if (ret < 0 && ctx->trans0) {
- PFREE_ST(ctx->trans0, db_trans_st);
- ctx->trans0 = NULL;
- }
+
ctx->max_trans = max_trans;
ctx->max_attrs = max_attrs;
ctx->trans_cur = ctx->trans0;
@@ -158,7 +151,7 @@ out:
ctx->prop.protoid = protoid;
ctx->prop.trans = ctx->trans0;
ctx->prop.trans_cnt = 0;
- return ret;
+ return 0;
}
/* Expand storage for transforms by number delta_trans */
diff --git a/src/pluto/ipsec_doi.c b/src/pluto/ipsec_doi.c
index 7e53e4069..5c0927cbb 100644
--- a/src/pluto/ipsec_doi.c
+++ b/src/pluto/ipsec_doi.c
@@ -30,6 +30,7 @@
#include <freeswan.h>
#include <ipsec_policy.h>
+#include <asn1/asn1.h>
#include "constants.h"
#include "defs.h"
diff --git a/src/pluto/pgp.c b/src/pluto/pgp.c
index 1336ca667..c64f97825 100644
--- a/src/pluto/pgp.c
+++ b/src/pluto/pgp.c
@@ -633,7 +633,7 @@ list_pgp_end_certs(bool utc)
c.type = CERT_PGP;
c.u.pgp = cert;
- whack_log(RC_COMMENT, "%T, count: %d", &cert->installed, utc), cert->count;
+ whack_log(RC_COMMENT, "%T, count: %d", &cert->installed, utc, cert->count);
datatot(cert->fingerprint, PGP_FINGERPRINT_SIZE, 'x', buf, BUF_LEN);
whack_log(RC_COMMENT, " fingerprint: %s", buf);
form_keyid(cert->publicExponent, cert->modulus, buf, &keysize);
diff --git a/src/pluto/pkcs1.c b/src/pluto/pkcs1.c
index 73fa7cc06..d2a8edb2b 100644
--- a/src/pluto/pkcs1.c
+++ b/src/pluto/pkcs1.c
@@ -560,7 +560,7 @@ chunk_t pkcs1_build_signature(chunk_t tbs, int hash_alg,
u_char digest_buf[MAX_DIGEST_LEN];
chunk_t digest = { digest_buf, MAX_DIGEST_LEN };
- chunk_t digestInfo, alg_id, signatureValue;
+ chunk_t digestInfo, signatureValue;
u_char *pos;
if (!compute_digest(tbs, hash_alg, &digest))
diff --git a/src/pluto/plutomain.c b/src/pluto/plutomain.c
index 32adf4a26..d40f8b457 100644
--- a/src/pluto/plutomain.c
+++ b/src/pluto/plutomain.c
@@ -72,6 +72,7 @@
#include "crypto.h" /* requires sha1.h and md5.h */
#include "nat_traversal.h"
#include "virtual.h"
+#include "timer.h"
static void usage(const char *mess)
{