diff --git a/src/files.c b/src/files.c index 5878ff00..bbf3b47f 100644 --- a/src/files.c +++ b/src/files.c @@ -62,7 +62,7 @@ bool has_valid_path(const char *filename) /* Add an item to the circular list of openfile structs. */ void make_new_buffer(void) { - openfilestruct *newnode = make_new_opennode(); + openfilestruct *newnode = nmalloc(sizeof(openfilestruct)); if (openfile == NULL) { /* Make the first open file the only element in the list. */ diff --git a/src/nano.c b/src/nano.c index 1de79c0b..3f475905 100644 --- a/src/nano.c +++ b/src/nano.c @@ -502,12 +502,6 @@ void copy_from_buffer(filestruct *somebuffer) ingraft_buffer(the_copy); } -/* Create a new openfile node. */ -openfilestruct *make_new_opennode(void) -{ - return (openfilestruct *)nmalloc(sizeof(openfilestruct)); -} - #ifdef ENABLE_MULTIBUFFER /* Unlink a node from the rest of the circular list, and delete it. */ void unlink_opennode(openfilestruct *fileptr) diff --git a/src/proto.h b/src/proto.h index a157ece0..2c056c52 100644 --- a/src/proto.h +++ b/src/proto.h @@ -398,7 +398,6 @@ void extract_buffer(filestruct **file_top, filestruct **file_bot, filestruct *top, size_t top_x, filestruct *bot, size_t bot_x); void ingraft_buffer(filestruct *somebuffer); void copy_from_buffer(filestruct *somebuffer); -openfilestruct *make_new_opennode(void); #ifdef ENABLE_MULTIBUFFER void unlink_opennode(openfilestruct *fileptr); void delete_opennode(openfilestruct *fileptr);