aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2001-12-07 16:27:37 +0000
committerMatt Kraai <kraai@debian.org>2001-12-07 16:27:37 +0000
commit3eeab3b23f37e45e66659308590bd22dad99e382 (patch)
treee7baff190b7a07152d20513dfcd4f32829bec322
parent6834ee941aa07177dbe55a702e11d67f89d0cc88 (diff)
downloadbusybox-3eeab3b23f37e45e66659308590bd22dad99e382.tar.gz
Update copyright and close file descriptors (noted by Axel Kittenberger).
-rw-r--r--coreutils/dd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index d46db82a0..818ab777e 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -3,7 +3,7 @@
* Mini dd implementation for busybox
*
*
- * Copyright (C) 2000 by Matt Kraai <kraai@alumni.carnegiemellon.edu>
+ * Copyright (C) 2000,2001 Matt Kraai
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -147,6 +147,12 @@ int dd_main(int argc, char **argv)
out_part++;
}
+ if (close (ifd) < 0)
+ perror_msg_and_die("%s", infile);
+
+ if (close (ofd) < 0)
+ perror_msg_and_die("%s", outfile);
+
fprintf(stderr, "%ld+%ld records in\n", (long)in_full, (long)in_part);
fprintf(stderr, "%ld+%ld records out\n", (long)out_full, (long)out_part);