From 6911cc782be6f12fd2aebc701fc8d0bde3f826d5 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Wed, 12 Jun 2019 06:34:07 -0400 Subject: [PATCH] Removed reduntant variable --- casadm/statistics_model.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/casadm/statistics_model.c b/casadm/statistics_model.c index 9cb03e1..8d24443 100644 --- a/casadm/statistics_model.c +++ b/casadm/statistics_model.c @@ -1175,13 +1175,6 @@ int cache_status(unsigned int cache_id, unsigned int core_id, int io_class_id, return FAILURE; } - /* Select file to which statistics shall be printed and - * - */ - FILE *outfile; - - outfile = stdout; - /** * printing in statistics will be performed in separate * thread, so that we can interleave statistics collecting @@ -1189,7 +1182,7 @@ int cache_status(unsigned int cache_id, unsigned int core_id, int io_class_id, */ struct stats_printout_ctx printout_ctx; printout_ctx.intermediate = intermediate_file[0]; - printout_ctx.out = outfile; + printout_ctx.out = stdout; printout_ctx.type = (OUTPUT_FORMAT_CSV == output_format ? CSV : TEXT); pthread_t thread; pthread_create(&thread, 0, stats_printout, &printout_ctx); @@ -1302,8 +1295,5 @@ cleanup: fclose(intermediate_file[0]); - if (outfile != stdout) { - fclose(outfile); - } return ret; }