Back to index

nagios-plugins  1.4.16
vasprintf.c File Reference
#include <config.h>
#include <stdio.h>
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include "vasnprintf.h"

Go to the source code of this file.


int vasprintf (char **resultp, const char *format, va_list args)

Function Documentation

int vasprintf ( char **  resultp,
const char *  format,
va_list  args 

Definition at line 34 of file vasprintf.c.

  size_t length;
  char *result = vasnprintf (NULL, &length, format, args);
  if (result == NULL)
    return -1;

  if (length > INT_MAX)
      free (result);
      errno = EOVERFLOW;
      return -1;

  *resultp = result;
  /* Return the number of resulting bytes, excluding the trailing NUL.  */
  return length;

Here is the call graph for this function:

Here is the caller graph for this function: