Skip to content

Commit

Permalink
lib: remove close_keep_errno()
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef 'Jeff' Sipek authored and Timo Sirainen committed Oct 3, 2017
1 parent ad81591 commit e4ac564
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
12 changes: 0 additions & 12 deletions src/lib/lib.c
Expand Up @@ -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)
{
Expand Down
1 change: 0 additions & 1 deletion src/lib/lib.h
Expand Up @@ -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. */
Expand Down

0 comments on commit e4ac564

Please sign in to comment.