mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-30 04:47:06 +02:00
Exit if we run out of memory initializing hash tables. There's no sane way to recover.
This commit is contained in:
+7
-4
@@ -53,10 +53,13 @@ static int CompareUserFuncs(void *a, void *b)
|
||||
void
|
||||
InitUserFunctions(void)
|
||||
{
|
||||
hash_table_init(&FuncHash,
|
||||
offsetof(UserFunc, link),
|
||||
HashUserFunc,
|
||||
CompareUserFuncs);
|
||||
if (hash_table_init(&FuncHash,
|
||||
offsetof(UserFunc, link),
|
||||
HashUserFunc,
|
||||
CompareUserFuncs) < 0) {
|
||||
fprintf(stderr, "Unable to initialize function hash table: Out of memory. Exiting.\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user