return EXIT_FAILURE;
}
- char *src = NULL;
- char *dst = NULL;
- int rc = EXIT_FAILURE;
+ char *src = NULL;
+ char *dst = NULL;
+ int rc = EXIT_FAILURE;
size_t srcSize = 8;
- src = malloc(srcSize);
+ src = malloc(srcSize);
if (src == NULL) {
fprintf(stderr, "can not allocate memory: %zu\n", srcSize);
goto Exit;
}
- size_t dstSize = 0;
+ size_t dstSize = 0;
size_t srcWantSize = 0;
size_t dstWantSize = 0;
- size_t n = 0;
+ size_t n = 0;
for (;;) {
n = fread(src, 1, 8, stdin);
if (n < 8) {
if (srcWantSize > srcSize) {
free(src);
srcSize = srcWantSize;
- src = malloc(srcSize);
+ src = malloc(srcSize);
if (src == NULL) {
fprintf(stderr, "can not allocate memory: %zu\n", srcSize);
goto Exit;
if (dstWantSize > dstSize) {
free(dst);
dstSize = dstWantSize;
- dst = malloc(dstSize);
+ dst = malloc(dstSize);
if (dst == NULL) {
fprintf(stderr, "can not allocate memory: %zu\n", dstSize);
goto Exit;