aboutsummaryrefslogtreecommitdiff
path: root/dd.c
diff options
context:
space:
mode:
authorerik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-03-21 22:32:57 +0000
committererik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-03-21 22:32:57 +0000
commitd67b2b05efca2a57f7f25e521450c200ef38803e (patch)
treeaf12b114d51e9ae7a8753baf09feb9ab8d654f26 /dd.c
parentcfe2ce6d7262d074b6fe0c1dea4d96df37e8a9ef (diff)
downloadbusybox-w32-d67b2b05efca2a57f7f25e521450c200ef38803e.tar.gz
busybox-w32-d67b2b05efca2a57f7f25e521450c200ef38803e.tar.bz2
busybox-w32-d67b2b05efca2a57f7f25e521450c200ef38803e.zip
* 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 git-svn-id: svn://busybox.net/trunk/busybox@416 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'dd.c')
-rw-r--r--dd.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/dd.c b/dd.c
index 0d5b3e8ab..f40dec712 100644
--- a/dd.c
+++ b/dd.c
@@ -114,11 +114,7 @@ extern int dd_main(int argc, char **argv)
114 argv++; 114 argv++;
115 } 115 }
116 116
117 buf = malloc(blockSize); 117 buf = xmalloc(blockSize);
118 if (buf == NULL) {
119 fprintf(stderr, "Cannot allocate buffer\n");
120 exit(FALSE);
121 }
122 118
123 intotal = 0; 119 intotal = 0;
124 outTotal = 0; 120 outTotal = 0;