From f6e4d33afcbfe6efcd9bcbae1c1a60fa4e18454e Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Fri, 14 Jan 2005 17:17:11 +0000 Subject: [PATCH] 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 --- src/files.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/files.c b/src/files.c index 96abdb27..0df6c8fd 100644 --- a/src/files.c +++ b/src/files.c @@ -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; -- 2.39.5