=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/man_validate.c,v retrieving revision 1.104 retrieving revision 1.105 diff -c -r1.104 -r1.105 *** src/usr.bin/mandoc/man_validate.c 2017/07/26 10:33:02 1.104 --- src/usr.bin/mandoc/man_validate.c 2018/04/11 17:10:35 1.105 *************** *** 1,7 **** ! /* $OpenBSD: man_validate.c,v 1.104 2017/07/26 10:33:02 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons ! * Copyright (c) 2010, 2012-2017 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above --- 1,7 ---- ! /* $OpenBSD: man_validate.c,v 1.105 2018/04/11 17:10:35 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons ! * Copyright (c) 2010, 2012-2018 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above *************** *** 118,123 **** --- 118,124 ---- case ROFFT_ROOT: check_root(man, n); break; + case ROFFT_COMMENT: case ROFFT_EQN: case ROFFT_TBL: break; *************** *** 147,156 **** static void check_root(CHKARGS) { - assert((man->flags & (MAN_BLINE | MAN_ELINE)) == 0); ! if (NULL == man->first->child) mandoc_msg(MANDOCERR_DOC_EMPTY, man->parse, n->line, n->pos, NULL); else --- 148,156 ---- static void check_root(CHKARGS) { assert((man->flags & (MAN_BLINE | MAN_ELINE)) == 0); ! if (n->last == NULL || n->last->type == ROFFT_COMMENT) mandoc_msg(MANDOCERR_DOC_EMPTY, man->parse, n->line, n->pos, NULL); else