summaryrefslogtreecommitdiffstats
path: root/mdoc_validate.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-04-03 09:53:50 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-04-03 09:53:50 +0000
commit7b602cf91c4da49b12d6eea1b45ac5fdfec6d095 (patch)
treeebae016cf966ba1ceeaf1f2a6cb2a1be84d3dbba /mdoc_validate.c
parent215f5f374762355aa7c42949ff83bd0397788d08 (diff)
downloadmandoc-7b602cf91c4da49b12d6eea1b45ac5fdfec6d095.tar.gz
Make uname have its return value checked for -1 (POSIX style), not
non-zero. From a PR by Yuri Pankov, ok schwarze@.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index d9819ecb..9180b580 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -2194,7 +2194,7 @@ post_os(POST_ARGS)
return(0);
}
#else /*!OSNAME */
- if (uname(&utsname)) {
+ if (-1 == uname(&utsname)) {
mdoc_nmsg(mdoc, n, MANDOCERR_UNAME);
mdoc->meta.os = mandoc_strdup("UNKNOWN");
return(post_prol(mdoc));