diff --git a/src/dj.c b/src/dj.c index f938ca9..8c9f327 100644 --- a/src/dj.c +++ b/src/dj.c @@ -59,11 +59,8 @@ static int write_flags = O_WRONLY | O_CREAT; #define MIN(a, b) (((a) < (b)) ? (a) : (b)) -/* Macro to check if fd is a std* file, e.g. stdin. */ -#define fdisstd(fd) \ - ((fd) == STDIN_FILENO \ - || (fd) == STDOUT_FILENO \ - || (fd) == STDERR_FILENO) +/* Macro to check if fd is stdin or stdout */ +#define fdisstd(fd) ((fd) == STDIN_FILENO || (fd) == STDOUT_FILENO) /* Fills the unused portion of io's buffer with padding, updating io->bufuse. * Returns io. */ @@ -142,7 +139,6 @@ Io_fdseek(struct Io *io){ assert(io != NULL); assert(io->fd != STDIN_FILENO || io->fl == read_flags); assert(io->fd != STDOUT_FILENO || io->fl == write_flags); - assert(io->fd != STDERR_FILENO || io->fl == write_flags); if(io->seek == 0 || (!fdisstd(io->fd) && lseek(io->fd, io->seek, SEEK_SET) != -1)){