]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: remove close_keep_errno()
authorJosef 'Jeff' Sipek <jeff.sipek@dovecot.fi>
Wed, 20 Sep 2017 08:27:05 +0000 (11:27 +0300)
committerTimo Sirainen <tss@dovecot.fi>
Tue, 3 Oct 2017 07:14:05 +0000 (10:14 +0300)
src/lib/lib.c
src/lib/lib.h

index ba4e4433151d44608b25fdc640b9470a4fd63419..413474fcc19549bff71c0cf50b013dd69d27946c 100644 (file)
@@ -29,18 +29,6 @@ struct atexit_callback {
 
 static ARRAY(struct atexit_callback) atexit_callbacks = ARRAY_INIT;
 
-int close_keep_errno(int *fd)
-{
-       int ret, old_errno = errno;
-
-       i_assert(*fd != -1);
-
-       ret = close(*fd);
-       *fd = -1;
-       errno = old_errno;
-       return ret;
-}
-
 void i_close_fd_real(int *fd, const char *arg, const char *func,
                     const char *file, int line)
 {
index a02fbb1f7c0ef90bfa3f2f378af7dd5dc5b8541f..995fec4b67127ac3b32416143426f278dbc2096f 100644 (file)
@@ -55,7 +55,6 @@ typedef void lib_atexit_callback_t(void);
    also inside chroots. */
 extern int dev_null_fd;
 
-int close_keep_errno(int *fd);
 /* Close fd_in and fd_out, unless they're already -1. They can point to the
    same fd, in which case they're closed only once. If they point to stdin
    or stdout, they're replaced with /dev/null. */