| 671 | /* Ensure input buffer IBUF is allocated. */ |
| 672 | |
| 673 | static void |
| 674 | alloc_ibuf (void) |
| 675 | { |
| 676 | if (ibuf) |
| 677 | return; |
| 678 | |
| 679 | bool extra_byte_for_swab = !!(conversions_mask & C_SWAB); |
| 680 | ibuf = alignalloc (page_size, input_blocksize + extra_byte_for_swab); |
| 681 | if (!ibuf) |
| 682 | { |
| 683 | char hbuf[LONGEST_HUMAN_READABLE + 1]; |
| 684 | error (EXIT_FAILURE, 0, |
| 685 | _("memory exhausted by input buffer of size %td bytes (%s)"), |
| 686 | input_blocksize, |
| 687 | human_readable (input_blocksize, hbuf, |
| 688 | human_opts | human_base_1024, 1, 1)); |
| 689 | } |
| 690 | } |
| 691 | |
| 692 | /* Ensure output buffer OBUF is allocated/initialized. */ |
| 693 |
no outgoing calls
no test coverage detected