tests: fix coding style

* tests/cxx-type.at, tests/glr-regression.at:
Prefer strdup to malloc+strcpy.
Use snake_case.
This commit is contained in:
Akim Demaille
2021-10-23 06:20:10 +02:00
parent 7558cbf373
commit c9b5b46d74
2 changed files with 40 additions and 44 deletions

View File

@@ -294,9 +294,8 @@ FILE *input;
return 0;
else
{
char *s;
assert (strlen (buf) < sizeof buf - 1);
s = YY_CAST (char *, malloc (strlen (buf) + 1));
char *s = YY_CAST (char *, malloc (strlen (buf) + 1));
strcpy (s, buf);
]AT_VAL[ = s;
return 'V';