Commit f6e4d33a authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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
No related merge requests found
Showing with 1 addition and 2 deletions
+1 -2
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment