commit | 0d068a20676144e9fd6796cc77764c420d785394 | [log] [tgz] |
---|---|---|
author | Erik Andersen <andersen@codepoet.org> | Tue Mar 21 22:32:57 2000 +0000 |
committer | Erik Andersen <andersen@codepoet.org> | Tue Mar 21 22:32:57 2000 +0000 |
tree | af12b114d51e9ae7a8753baf09feb9ab8d654f26 | |
parent | c053e41fa0524d828bf90f47e5e3637b8facaadc [diff] [blame] |
* 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
diff --git a/coreutils/dd.c b/coreutils/dd.c index 0d5b3e8..f40dec7 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c
@@ -114,11 +114,7 @@ argv++; } - buf = malloc(blockSize); - if (buf == NULL) { - fprintf(stderr, "Cannot allocate buffer\n"); - exit(FALSE); - } + buf = xmalloc(blockSize); intotal = 0; outTotal = 0;