include strlcpy and *printf and use them

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14930 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-04-24 19:43:06 +00:00
parent da6cb81649
commit ddb34e00b3
4 changed files with 40 additions and 8 deletions

View File

@@ -102,9 +102,8 @@ statement : INDEX NUMBER
}
| PREFIX STRING
{
prefix = realloc(prefix, strlen($2) + 2);
strcpy(prefix, $2);
strcat(prefix, "_");
free(prefix);
asprintf (&prefix, "%s_", $2);
free($2);
}
| PREFIX