-/* $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 <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
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*/