{
char *p;
+ if(!s)
+ return NULL;
+
p = strdup(s);
if(!p)
xalloc_fail ((int)strlen(s));
int result = vsnprintf(buf, sizeof buf, fmt, ap);
if(result < 0)
exit(xalloc_exit_failure);
+ buf[sizeof buf - 1] = 0;
*strp = xstrdup(buf);
#else
int result = vasprintf(strp, fmt, ap);