remove internal reallocarray()

... as it's covered by libbpf_reallocarray() since commit dc70da9c70.
This commit is contained in:
Vladimír Čunát
2020-09-07 21:19:02 +02:00
committed by Andrii Nakryiko
parent ff797cc905
commit 5a10cd2060
4 changed files with 0 additions and 45 deletions

View File

@@ -1,20 +0,0 @@
// SPDX-License-Identifier: (LGPL-2.0+ OR BSD-2-Clause)
/* Copyright (C) 2018 Netronome Systems, Inc. */
#ifndef __TOOLS_LIBC_COMPAT_H
#define __TOOLS_LIBC_COMPAT_H
#include <stdlib.h>
#include <linux/overflow.h>
#ifdef COMPAT_NEED_REALLOCARRAY
static inline void *reallocarray(void *ptr, size_t nmemb, size_t size)
{
size_t bytes;
if (unlikely(check_mul_overflow(nmemb, size, &bytes)))
return NULL;
return realloc(ptr, bytes);
}
#endif
#endif