1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 07:31:15 +02:00

Remove duplicate definition of allocBytes()

This commit is contained in:
Eelco Dolstra 2018-06-11 15:58:19 +02:00
parent 169e1478d8
commit 6ad0a2f749
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 15 additions and 29 deletions

View file

@ -43,20 +43,6 @@ static char * dupString(const char * s)
}
/* Note: Various places expect the allocated memory to be zeroed. */
static void * allocBytes(size_t n)
{
void * p;
#if HAVE_BOEHMGC
p = GC_malloc(n);
#else
p = calloc(n, 1);
#endif
if (!p) throw std::bad_alloc();
return p;
}
static void printValue(std::ostream & str, std::set<const Value *> & active, const Value & v)
{
checkInterrupt();