diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-03-21 22:32:57 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-03-21 22:32:57 +0000 |
commit | 0d068a20676144e9fd6796cc77764c420d785394 (patch) | |
tree | af12b114d51e9ae7a8753baf09feb9ab8d654f26 /dd.c | |
parent | c053e41fa0524d828bf90f47e5e3637b8facaadc (diff) | |
download | busybox-w32-0d068a20676144e9fd6796cc77764c420d785394.tar.gz busybox-w32-0d068a20676144e9fd6796cc77764c420d785394.tar.bz2 busybox-w32-0d068a20676144e9fd6796cc77764c420d785394.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
Diffstat (limited to 'dd.c')
-rw-r--r-- | dd.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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; |