summaryrefslogtreecommitdiffstats
path: root/fd_move.c
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2013-02-04 00:08:53 +0100
committermanuel <manuel@mausz.at>2013-02-04 00:08:53 +0100
commit69aec538b456402170dc723af417ba5c05389c32 (patch)
treee6f34c543f17c6392447ea337b2e2868212424d1 /fd_move.c
downloadqmail-69aec538b456402170dc723af417ba5c05389c32.tar.gz
qmail-69aec538b456402170dc723af417ba5c05389c32.tar.bz2
qmail-69aec538b456402170dc723af417ba5c05389c32.zip
qmail 1.03 import
Diffstat (limited to 'fd_move.c')
-rw-r--r--fd_move.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/fd_move.c b/fd_move.c
new file mode 100644
index 0000000..1aa557f
--- /dev/null
+++ b/fd_move.c
@@ -0,0 +1,11 @@
1#include "fd.h"
2
3int fd_move(to,from)
4int to;
5int from;
6{
7 if (to == from) return 0;
8 if (fd_copy(to,from) == -1) return -1;
9 close(from);
10 return 0;
11}