aboutsummaryrefslogtreecommitdiff
path: root/coreutils/dd.c
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-03-21 22:32:57 +0000
committerErik Andersen <andersen@codepoet.org>2000-03-21 22:32:57 +0000
commit0d068a20676144e9fd6796cc77764c420d785394 (patch)
treeaf12b114d51e9ae7a8753baf09feb9ab8d654f26 /coreutils/dd.c
parentc053e41fa0524d828bf90f47e5e3637b8facaadc (diff)
downloadbusybox-0d068a20676144e9fd6796cc77764c420d785394.tar.gz
* all mallocs now use xmalloc (and so are OOM error safe), and
the common error handling saves a few bytes. Thanks to Bob Tinsley <bob@earthrise.demon.co.uk> for the patch. -Erik
Diffstat (limited to 'coreutils/dd.c')
-rw-r--r--coreutils/dd.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 0d5b3e8ab..f40dec712 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -114,11 +114,7 @@ extern int dd_main(int argc, char **argv)
argv++;
}
- buf = malloc(blockSize);
- if (buf == NULL) {
- fprintf(stderr, "Cannot allocate buffer\n");
- exit(FALSE);
- }
+ buf = xmalloc(blockSize);
intotal = 0;
outTotal = 0;