Refactor error reporting to simplify BSD-style err (#949)

This commit is contained in:
Rangi
2021-11-21 16:16:54 -05:00
committed by GitHub
parent 54293a9184
commit bdcef6f252
24 changed files with 262 additions and 297 deletions

View File

@@ -12,8 +12,8 @@
#include <string.h>
#include <assert.h>
#include "error.h"
#include "hashmap.h"
#include "extern/err.h"
/*
* The lower half of the hash is used to index the "master" table,
@@ -53,7 +53,7 @@ void **hash_AddElement(HashMap map, char const *key, void *element)
struct HashMapEntry *newEntry = malloc(sizeof(*newEntry));
if (!newEntry)
err(1, "%s: Failed to allocate new entry", __func__);
err("%s: Failed to allocate new entry", __func__);
newEntry->hash = hashedKey >> HALF_HASH_NB_BITS;
newEntry->key = key;