diff options
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r-- | mdoc_validate.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index 972c5ab8..0fe8b09a 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -2395,11 +2395,9 @@ post_os(POST_ARGS) if (-1 == uname(&utsname)) { mdoc_nmsg(mdoc, n, MANDOCERR_UNAME); defbuf = mandoc_strdup("UNKNOWN"); - } else if (-1 == asprintf(&defbuf, "%s %s", - utsname.sysname, utsname.release)) { - perror(NULL); - exit((int)MANDOCLEVEL_SYSERR); - } + } else + mandoc_asprintf(&defbuf, "%s %s", + utsname.sysname, utsname.release); } mdoc->meta.os = mandoc_strdup(defbuf); #endif /*!OSNAME*/ |