---
name: "firestring_realloc"
section: "3"
platform: "linux"
package: "libfirestring-dev"
version: "0.9.12-8"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/firestring_realloc"
---

# firestring\_realloc(3)

realloc(3) with internal result checking

## NAME

firestring\_realloc - [**realloc**(3)](/realloc/3.md) with internal result checking

## SYNOPSIS

**#include \<firestring.h\>**\
 **-lfirestring**

**void \*firestring\_realloc(void \****old***, const size\_t** *new***)**

## DESCRIPTION

firestring\_realloc() acts exactly like [**realloc**(3)](/realloc/3.md) except that it detects realloc failures, prints an error and [**exit**(3)](/exit/3.md) with exit status EXIT\_FAILURE.  In most programs, realloc failures are unrecoverable, and this is the preferred behaviour.

## RETURN VALUE

If firestring\_realloc() returns, it **always** returns a string of *new* bytes containing the data from *old* at the beginning.  It **never** returns *NULL.*

## AUTHOR

Ian Gulliver \<ian@penguinhosting.net\>

## SEE ALSO

[**libfirestring**(3)](/libfirestring/3.md)
