tweak new_file() to use mallocstrcpy() instead of charalloc() followed

by a null character initialization, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2264 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
David Lawrence Ramsey 2005-01-14 17:17:11 +00:00
parent 1bdccc5281
commit f6e4d33afc
1 changed files with 1 additions and 2 deletions

View File

@ -45,8 +45,7 @@ static file_format fmt = NIX_FILE;
void new_file(void)
{
fileage = make_new_node(NULL);
fileage->data = charalloc(1);
fileage->data[0] = '\0';
fileage->data = mallocstrcpy(NULL, "");
filebot = fileage;
edittop = fileage;
current = fileage;