* mdocml: Make uname have its return value checked for -1 (POSIX style),
@ 2011-04-03 9:53 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-04-03 9:53 UTC (permalink / raw)
To: source
Log Message:
-----------
Make uname have its return value checked for -1 (POSIX style), not
non-zero. From a PR by Yuri Pankov, ok schwarze@.
Modified Files:
--------------
mdocml:
mdoc_validate.c
Revision Data
-------------
Index: mdoc_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_validate.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.165 -r1.166
--- mdoc_validate.c
+++ 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));
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-04-03 9:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-03 9:53 mdocml: Make uname have its return value checked for -1 (POSIX style), kristaps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).