Back to index

nagios-plugins  1.4.16
Functions
malloc.c File Reference
#include <config.h>
#include <stdlib.h>
#include <errno.h>

Go to the source code of this file.

Functions

void * rpl_malloc (size_t n)

Function Documentation

void* rpl_malloc ( size_t  n)

Definition at line 40 of file malloc.c.

{
  void *result;

#ifdef NEED_MALLOC_GNU
  if (n == 0)
    n = 1;
#endif

  result = malloc (n);

#if !HAVE_MALLOC_POSIX
  if (result == NULL)
    errno = ENOMEM;
#endif

  return result;
}