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-11-06 08:29:59 +01:00
parent 7558cbf373
commit c9b5b46d74
2 changed files with 40 additions and 44 deletions
+1 -2
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';