tweaks: remove the superfluous closing of a file descriptor
The file itself is closed three lines earlier; this also closes the corresponding descriptor.
Этот коммит содержится в:
родитель
6fad6a17da
Коммит
a6365707c0
@ -832,12 +832,11 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable)
|
||||
/* If there was a real error during the reading, let the user know. */
|
||||
if (ferror(f) && errornumber != EINTR && errornumber != 0)
|
||||
statusline(ALERT, strerror(errornumber));
|
||||
|
||||
fclose(f);
|
||||
|
||||
if (fd > 0 && !undoable) {
|
||||
close(fd);
|
||||
if (fd > 0 && !undoable)
|
||||
writable = (ISSET(VIEW_MODE) || access(filename, W_OK) == 0);
|
||||
}
|
||||
|
||||
/* If the file ended with newline, or it was entirely empty, make the
|
||||
* last line blank. Otherwise, put the last read data in. */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user