diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-04-03 09:53:50 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-04-03 09:53:50 +0000 |
commit | 7b602cf91c4da49b12d6eea1b45ac5fdfec6d095 (patch) | |
tree | ebae016cf966ba1ceeaf1f2a6cb2a1be84d3dbba /mdoc_validate.c | |
parent | 215f5f374762355aa7c42949ff83bd0397788d08 (diff) | |
download | mandoc-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.c | 2 |
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)); |