1
1

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

Этот коммит содержится в:
Benno Schulenberg 2018-10-30 19:34:03 +01:00
родитель 9e2a12b62a
Коммит e9ba058f3d
3 изменённых файлов: 1 добавлений и 8 удалений

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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