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:
@@ -45,8 +45,7 @@ static file_format fmt = NIX_FILE;
|
|||||||
void new_file(void)
|
void new_file(void)
|
||||||
{
|
{
|
||||||
fileage = make_new_node(NULL);
|
fileage = make_new_node(NULL);
|
||||||
fileage->data = charalloc(1);
|
fileage->data = mallocstrcpy(NULL, "");
|
||||||
fileage->data[0] = '\0';
|
|
||||||
filebot = fileage;
|
filebot = fileage;
|
||||||
edittop = fileage;
|
edittop = fileage;
|
||||||
current = fileage;
|
current = fileage;
|
||||||
|
|||||||
Reference in New Issue
Block a user