=================================================================== RCS file: /cvs/mandoc/read.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -p -r1.90 -r1.91 --- mandoc/read.c 2014/10/12 19:31:41 1.90 +++ mandoc/read.c 2014/10/18 15:57:34 1.91 @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.90 2014/10/12 19:31:41 schwarze Exp $ */ +/* $Id: read.c,v 1.91 2014/10/18 15:57:34 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -768,7 +768,7 @@ mparse_readfd(struct mparse *curp, int fd, const char (*curp->mmsg)(MANDOCERR_SYSOPEN, curp->file_status, file, 0, 0, strerror(errno)); - goto out; + return(curp->file_status); } /* @@ -778,21 +778,19 @@ mparse_readfd(struct mparse *curp, int fd, const char * the parse phase for the file. */ - if ( ! read_whole_file(curp, file, fd, &blk, &with_mmap)) - goto out; - - mparse_parse_buffer(curp, blk, file); - + if (read_whole_file(curp, file, fd, &blk, &with_mmap)) { + mparse_parse_buffer(curp, blk, file); #if HAVE_MMAP - if (with_mmap) - munmap(blk.buf, blk.sz); - else + if (with_mmap) + munmap(blk.buf, blk.sz); + else #endif - free(blk.buf); + free(blk.buf); + } if (STDIN_FILENO != fd && -1 == close(fd)) perror(file); -out: + return(curp->file_status); }