1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

common: New function xreallocarray

* common/miscellaneous.c (gnupg_reallocarray): New.
(xreallocarray): New.
--

Taken from libgpg-error so that we can build with older versions of
libgpg-error.
This commit is contained in:
Werner Koch 2020-03-05 16:23:52 +01:00
parent 449b331952
commit f0d034ebf4
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
2 changed files with 63 additions and 0 deletions

View file

@ -314,6 +314,10 @@ void setup_libgcrypt_logging (void);
/* Print an out of core message and die. */
void xoutofcore (void);
/* Array allocation. */
void *gnupg_reallocarray (void *a, size_t oldnmemb, size_t nmemb, size_t size);
void *xreallocarray (void *a, size_t oldnmemb, size_t nmemb, size_t size);
/* Same as estream_asprintf but die on memory failure. */
char *xasprintf (const char *fmt, ...) GPGRT_ATTR_PRINTF(1,2);
/* This is now an alias to estream_asprintf. */