Browse Source

- removed duplicate code using switch-case shortcuts

development
Andreas Romeyke 2 years ago
parent
commit
6eae20b037
2 changed files with 2 additions and 7 deletions
  1. +1
    -4
      src/helper/renderer/check_renderer_ansi.c
  2. +1
    -3
      src/helper/renderer/check_renderer_default.c

+ 1
- 4
src/helper/renderer/check_renderer_ansi.c View File

@ -88,10 +88,7 @@ const char * renderer_ansi ( const retmsg_t * ret, short int is_quiet ) {
tmp=secstrcat(tmp, "\t--> ", & rendersize_tmp);
tmp=secstrcat(tmp, startp->rm_msg, & rendersize_tmp);
break;
case rm_tag: tmp=secstrcat(tmp, "\t", & rendersize_tmp );
tmp=secstrcat(tmp, ANSI_BOLD , & rendersize_tmp);
tmp=secstrcat(tmp, startp->rm_msg, & rendersize_tmp);
break;
case rm_tag:
case rm_mode: tmp=secstrcat(tmp, "\t", & rendersize_tmp );
tmp=secstrcat(tmp, ANSI_BOLD , & rendersize_tmp);
tmp=secstrcat(tmp, startp->rm_msg, & rendersize_tmp);


+ 1
- 3
src/helper/renderer/check_renderer_default.c View File

@ -46,9 +46,7 @@ const char * renderer_default ( const retmsg_t * ret, short int is_quiet ) {
case rm_rule: tmp=secstrcat(tmp, "\t--> ", & rendersize_tmp);
tmp=secstrcat(tmp, startp->rm_msg, & rendersize_tmp);
break;
case rm_tag: tmp=secstrcat(tmp, "\t", & rendersize_tmp );
tmp=secstrcat(tmp, startp->rm_msg, & rendersize_tmp);
break;
case rm_tag:
case rm_mode: tmp=secstrcat(tmp, "\t", & rendersize_tmp );
tmp=secstrcat(tmp, startp->rm_msg, & rendersize_tmp);
break;


Loading…
Cancel
Save