str_l = portable_vsnprintf(NULL, (size_t) 0, fmt, ap);
va_end(ap);
assert(str_l >= 0); /* possible integer overflow if str_m > INT_MAX */
str_l = portable_vsnprintf(NULL, (size_t) 0, fmt, ap);
va_end(ap);
assert(str_l >= 0); /* possible integer overflow if str_m > INT_MAX */
/* if str_m is 0, no buffer is allocated, just set *ptr to NULL */
if (str_m == 0) { /* not interested in resulting string, just return size */
} else {
/* if str_m is 0, no buffer is allocated, just set *ptr to NULL */
if (str_m == 0) { /* not interested in resulting string, just return size */
} else {
/* if str_m is 0, no buffer is allocated, just set *ptr to NULL */
if (str_m == 0) { /* not interested in resulting string, just return size */
} else {
/* if str_m is 0, no buffer is allocated, just set *ptr to NULL */
if (str_m == 0) { /* not interested in resulting string, just return size */
} else {
/* Do not want to use xbt_die() here, as it uses the logging
* infrastucture and may fail to allocate memory too. */
fprintf(stderr, "bprintf: vasprintf failed. Aborting.\n");
/* Do not want to use xbt_die() here, as it uses the logging
* infrastucture and may fail to allocate memory too. */
fprintf(stderr, "bprintf: vasprintf failed. Aborting.\n");