diff options
Diffstat (limited to 'usr.bin/mandoc/main.c')
-rw-r--r-- | usr.bin/mandoc/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c index 45f5c52d9f7..c2208c9d0d8 100644 --- a/usr.bin/mandoc/main.c +++ b/usr.bin/mandoc/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.177 2016/08/01 10:32:39 schwarze Exp $ */ +/* $OpenBSD: main.c,v 1.178 2016/08/09 15:08:15 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2012, 2014-2016 Ingo Schwarze <schwarze@openbsd.org> @@ -955,7 +955,8 @@ mmsg(enum mandocerr t, enum mandoclevel lvl, { const char *mparse_msg; - fprintf(stderr, "%s: %s:", getprogname(), file); + fprintf(stderr, "%s: %s:", getprogname(), + file == NULL ? "<stdin>" : file); if (line) fprintf(stderr, "%d:%d:", line, col + 1); |