diff options
author | Martin Willi <martin@strongswan.org> | 2009-04-21 15:36:58 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2009-04-21 15:36:58 +0000 |
commit | 134c9d9db04fff9948559780bccdfeabf4ce6825 (patch) | |
tree | 6ebded0d59cd3a3eb4c7081a4352bbeb57a39ddd /src/pluto/db_ops.c | |
parent | c258a3b36af95d9d415ae7f5d9a75a3b62e02f63 (diff) | |
download | strongswan-134c9d9db04fff9948559780bccdfeabf4ce6825.tar.bz2 strongswan-134c9d9db04fff9948559780bccdfeabf4ce6825.tar.xz |
fixed a bunch of compiler warnings, pgp end certificate listing
Diffstat (limited to 'src/pluto/db_ops.c')
-rw-r--r-- | src/pluto/db_ops.c | 11 |
1 files changed, 2 insertions, 9 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 */ |