X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/6d94a3c6ad51f302ad5516621ce9fa533b37055a..e7bd52bb8b529ce7e10d5d912a85f84a34390698:/mdoc_validate.c diff --git a/mdoc_validate.c b/mdoc_validate.c index 2e725d1c..18f51ca6 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.203 2014/03/23 11:25:26 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.204 2014/03/23 12:11:18 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -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*/