diff --git a/casadm/statistics_model.c b/casadm/statistics_model.c index b98a9eb..8d24443 100644 --- a/casadm/statistics_model.c +++ b/casadm/statistics_model.c @@ -1171,16 +1171,10 @@ int cache_status(unsigned int cache_id, unsigned int core_id, int io_class_id, if (create_pipe_pair(intermediate_file)) { cas_printf(LOG_ERR,"Failed to create unidirectional pipe.\n"); + close(ctrl_fd); 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 @@ -1188,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); @@ -1301,8 +1295,5 @@ cleanup: fclose(intermediate_file[0]); - if (outfile != stdout) { - fclose(outfile); - } return ret; } diff --git a/casadm/table.c b/casadm/table.c index 1f28dbe..44502cd 100644 --- a/casadm/table.c +++ b/casadm/table.c @@ -95,7 +95,6 @@ char *table_get(struct table *t,int y, int x) static const char * empty=""; if (y >= t->height || x >= t->width) { assert(0); - abort(); return (char*)empty; } diff --git a/modules/cas_cache/classifier.c b/modules/cas_cache/classifier.c index 9dd658e..00dd008 100644 --- a/modules/cas_cache/classifier.c +++ b/modules/cas_cache/classifier.c @@ -694,7 +694,7 @@ void cas_cls_rule_apply(ocf_cache_t cache, if (old) CAS_CLS_DEBUG_MSG("Removed rule for class %d\n", part_id); if (new) - CAS_CLS_DEBUG_MSG("New rule for for class %d\n", part_id); + CAS_CLS_DEBUG_MSG("New rule for class %d\n", part_id); return; }