1047
1048
/* Try to print in the allocated space. */
1049
1051
n = vsnprintf(p, size, fmt, ap);
1051
1054
/* If that worked, return the string. */
1054
1059
/* Else try again with more space. */
1055
1061
if (n > \-1) /* glibc 2.1 */
1056
1062
size = n+1; /* precisely what is needed */
1058
1064
size *= 2; /* twice the old size */
1059
1066
if ((np = realloc (p, size)) == NULL) {