Browse Source

- removed duplicate code using switch-case shortcuts

development
Andreas Romeyke 2 years ago
parent
commit
6eae20b037
  1. 5
      src/helper/renderer/check_renderer_ansi.c
  2. 4
      src/helper/renderer/check_renderer_default.c

5
src/helper/renderer/check_renderer_ansi.c

@ -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);

4
src/helper/renderer/check_renderer_default.c

@ -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