dj(1): remove Io_buffree

This commit is contained in:
dtb 2024-06-26 12:45:50 -06:00
parent 66f5498232
commit b70b356ce5
Signed by: trinity
GPG Key ID: 34C0543BBB6AF81B

View File

@ -67,8 +67,8 @@ static int write_flags = O_WRONLY | O_CREAT;
* particular io[2] used in main. Error conditions are not checked because this
* is only used when the program is about to terminate (hence its name). */
#define terminate(io) do{ \
Io_buffree(&(io)[0]); \
Io_buffree(&(io)[1]); \
free((io[0]).buf); \
free((io[1]).buf); \
Io_fdclose(&(io)[0]); \
Io_fdclose(&(io)[1]); }while(0)
@ -79,15 +79,6 @@ Io_bufalloc(struct Io *io){
return (io->buf = malloc(io->bs * (sizeof *io->buf)));
}
/* Frees *io's buffer. Returns io. */
static struct Io *
Io_buffree(struct Io *io){
free(io->buf);
return io;
}
/* Fills the unused portion of io's buffer with padding, updating io->bufuse.
* Returns io. */
static struct Io *