Skip to content

Commit 0e26292

Browse files
guohengccmywish
authored andcommitted
Modify var declartion position and add comment
1 parent 891f450 commit 0e26292

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/xy.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,6 @@ static char *
473473
_xy_str_to_terminal_style (int style, const char *str)
474474
{
475475
char *color_fmt_str = NULL;
476-
size_t len;
477-
char *buf;
478476

479477
if (!xy.enable_color)
480478
{
@@ -510,7 +508,9 @@ _xy_str_to_terminal_style (int style, const char *str)
510508
color_fmt_str = "\e[9m%s\e[0m"; break;
511509
}
512510

513-
511+
// 标签后第一句必须为statement,否则会编译不通过
512+
size_t len;
513+
char *buf;
514514
new_str:
515515
// -2 把中间%s减掉
516516
len = strlen (color_fmt_str) - 2;

0 commit comments

Comments
 (0)