Removed unused variables.

This commit is contained in:
Tobias Brunner 2011-04-12 14:28:18 +02:00
parent f486bf2666
commit 24e0595437
3 changed files with 5 additions and 9 deletions

View File

@ -116,7 +116,7 @@ static void release(private_resolve_handler_t *this, identification_t *server,
configuration_attribute_type_t type, chunk_t data) configuration_attribute_type_t type, chunk_t data)
{ {
FILE *in, *out; FILE *in, *out;
char line[1024], matcher[512], *pos; char line[1024], matcher[512];
host_t *addr; host_t *addr;
int family; int family;
@ -148,7 +148,7 @@ static void release(private_resolve_handler_t *this, identification_t *server,
addr, server); addr, server);
/* copy all, but matching line */ /* copy all, but matching line */
while ((pos = fgets(line, sizeof(line), in))) while (fgets(line, sizeof(line), in))
{ {
if (strneq(line, matcher, strlen(matcher))) if (strneq(line, matcher, strlen(matcher)))
{ {

View File

@ -149,7 +149,6 @@ struct db_context *ike_alg_db_new(connection_t *c, lset_t policy)
struct alg_info_ike *ai = c->alg_info_ike; struct alg_info_ike *ai = c->alg_info_ike;
struct db_context *db_ctx = NULL; struct db_context *db_ctx = NULL;
struct ike_info *ike_info; struct ike_info *ike_info;
struct encrypt_desc *enc_desc;
u_int ealg, halg, modp, eklen = 0; u_int ealg, halg, modp, eklen = 0;
int i; int i;
@ -191,7 +190,6 @@ struct db_context *ike_alg_db_new(connection_t *c, lset_t policy)
enum_show(&oakley_group_names, modp)); enum_show(&oakley_group_names, modp));
continue; continue;
} }
enc_desc = ike_alg_get_crypter(ealg);
if (policy & POLICY_PUBKEY) if (policy & POLICY_PUBKEY)
{ {
@ -312,7 +310,7 @@ static void print_alg(char *buf, int *len, enum_names *alg_names, int alg_type,
{ {
char alg_name[BUF_LEN]; char alg_name[BUF_LEN];
int alg_name_len; int alg_name_len;
alg_name_len = sprintf(alg_name, " %s[%s]", enum_name(alg_names, alg_type), alg_name_len = sprintf(alg_name, " %s[%s]", enum_name(alg_names, alg_type),
plugin_name); plugin_name);
if (*len + alg_name_len > CRYPTO_MAX_ALG_LINE) if (*len + alg_name_len > CRYPTO_MAX_ALG_LINE)

View File

@ -404,7 +404,7 @@ static void print_alg(char *buf, int *len, enum_names *alg_names, int alg_type)
{ {
char alg_name[BUF_LEN]; char alg_name[BUF_LEN];
int alg_name_len; int alg_name_len;
alg_name_len = sprintf(alg_name, " %s", enum_name(alg_names, alg_type)); alg_name_len = sprintf(alg_name, " %s", enum_name(alg_names, alg_type));
if (*len + alg_name_len > CRYPTO_MAX_ALG_LINE) if (*len + alg_name_len > CRYPTO_MAX_ALG_LINE)
{ {
@ -633,12 +633,11 @@ static bool kernel_alg_db_add(struct db_context *db_ctx,
* malloced pointer (this quirk allows easier spdb.c change) * malloced pointer (this quirk allows easier spdb.c change)
*/ */
struct db_context* kernel_alg_db_new(struct alg_info_esp *alg_info, struct db_context* kernel_alg_db_new(struct alg_info_esp *alg_info,
lset_t policy ) lset_t policy)
{ {
const struct esp_info *esp_info; const struct esp_info *esp_info;
struct esp_info tmp_esp_info; struct esp_info tmp_esp_info;
struct db_context *ctx_new = NULL; struct db_context *ctx_new = NULL;
struct db_prop *prop;
u_int trans_cnt = esp_ealg_num * esp_aalg_num; u_int trans_cnt = esp_ealg_num * esp_aalg_num;
if (!(policy & POLICY_ENCRYPT)) /* not possible, I think */ if (!(policy & POLICY_ENCRYPT)) /* not possible, I think */
@ -659,7 +658,6 @@ struct db_context* kernel_alg_db_new(struct alg_info_esp *alg_info,
kernel_alg_db_add(ctx_new, &tmp_esp_info, policy); kernel_alg_db_add(ctx_new, &tmp_esp_info, policy);
} }
} }
prop = db_prop_get(ctx_new);
return ctx_new; return ctx_new;
} }