diff --git a/src/dj.c b/src/dj.c index 7c0b7c3..01832a8 100644 --- a/src/dj.c +++ b/src/dj.c @@ -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 *