Skip to content

Commit f10a49d

Browse files
guohengccmywish
authored andcommitted
Just modify first statement after label
1 parent 0e26292 commit f10a49d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/xy.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,11 +510,10 @@ _xy_str_to_terminal_style (int style, const char *str)
510510

511511
// 标签后第一句必须为statement,否则会编译不通过
512512
size_t len;
513-
char *buf;
514513
new_str:
515514
// -2 把中间%s减掉
516515
len = strlen (color_fmt_str) - 2;
517-
buf = malloc (strlen (str) + len + 1);
516+
char *buf = malloc (strlen (str) + len + 1);
518517
sprintf (buf, color_fmt_str, str);
519518
return buf;
520519
}

0 commit comments

Comments
 (0)