summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/appl/bsd/krcp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/appl/bsd/krcp.c b/src/appl/bsd/krcp.c
index a5370a297..eed615ffa 100644
--- a/src/appl/bsd/krcp.c
+++ b/src/appl/bsd/krcp.c
@@ -1115,7 +1115,8 @@ void sink(argc, argv)
wrerr++;
if (ftruncate(of, size))
error("rcp: can't truncate %s: %s\n", nambuf, error_message(errno));
- (void) close(of);
+ if (close(of) != 0)
+ error("rcp: error closing %s: %s\n", nambuf, error_message(errno));
(void) response();
if (setimes) {
setimes = 0;