Skip to content

Commit

Permalink
For older versions of C, no variable definitions after statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwsw committed May 16, 2021
1 parent df845a5 commit 9a1161e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lesskey_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ xbuf_add(xbuf, ch)
{
if (xbuf->end >= xbuf->size)
{
char *data;
xbuf->size = xbuf->size * 2;
char *data = ecalloc(xbuf->size, sizeof(char));
data = ecalloc(xbuf->size, sizeof(char));
memcpy(data, xbuf->data, xbuf->end);
free(xbuf->data);
xbuf->data = data;
Expand Down

0 comments on commit 9a1161e

Please sign in to comment.