mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-05-06 07:37:58 +02:00
Exit if we run out of memory initializing hash tables. There's no sane way to recover.
This commit is contained in:
@@ -53,8 +53,11 @@ static int VarCompareFunc(void *a, void *b)
|
||||
void
|
||||
InitVars(void)
|
||||
{
|
||||
hash_table_init(&VHashTbl, offsetof(Var, link),
|
||||
VarHashFunc, VarCompareFunc);
|
||||
if (hash_table_init(&VHashTbl, offsetof(Var, link),
|
||||
VarHashFunc, VarCompareFunc) < 0) {
|
||||
fprintf(stderr, "Unable to initialize variable hash table: Out of memory. Exiting.\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
static double
|
||||
|
||||
Reference in New Issue
Block a user