diff --git a/test/fko-wrapper/fko_wrapper.c b/test/fko-wrapper/fko_wrapper.c index d3ef616e..644bed38 100644 --- a/test/fko-wrapper/fko_wrapper.c +++ b/test/fko-wrapper/fko_wrapper.c @@ -29,9 +29,6 @@ static void spa_func_getset_int(fko_ctx_t *ctx, char *set_name, char *get_name, int (*spa_get)(fko_ctx_t ctx, int *val), int min, int max, int final_val, int new_ctx_flag, int destroy_ctx_flag); -static void spa_func_short(fko_ctx_t *ctx, char *name, - int (*spa_func)(fko_ctx_t ctx, const short modifier), int min, int max, - int final_val, int new_ctx_flag, int destroy_ctx_flag); static void spa_func_getset_short(fko_ctx_t *ctx, char *set_name, int (*spa_set)(fko_ctx_t ctx, const short modifier), char *get_name, int (*spa_get)(fko_ctx_t ctx, short *val), @@ -87,35 +84,24 @@ test_loop(int new_ctx_flag, int destroy_ctx_flag) for (i=0; i" : spa_data); - if (destroy_ctx_flag == CTX_DESTROY) - { - fko_destroy(ctx); - ctx = NULL; - } + ctx_update(&ctx, new_ctx_flag, destroy_ctx_flag); } printf("fko_new_with_data(): %s\n", @@ -205,42 +170,26 @@ test_loop(int new_ctx_flag, int destroy_ctx_flag) display_ctx(decrypt_ctx); - if (destroy_ctx_flag == CTX_DESTROY) - { - fko_destroy(ctx); - ctx = NULL; - } + ctx_update(&ctx, new_ctx_flag, destroy_ctx_flag); } /* now, separately verify hmac, decrypt, and display ctx */ for (i=0; i