tweaks: elide a function that is used just once and is a oneliner

This commit is contained in:
Benno Schulenberg 2018-10-30 19:34:03 +01:00
parent 9e2a12b62a
commit e9ba058f3d
3 changed files with 1 additions and 8 deletions

View File

@ -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. */

View File

@ -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)

View File

@ -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);