summaryrefslogtreecommitdiff
path: root/crypto/lhash/lhash.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/lhash/lhash.h')
-rw-r--r--crypto/lhash/lhash.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/lhash/lhash.h b/crypto/lhash/lhash.h
index 70cbc6dfe7..06aad873b2 100644
--- a/crypto/lhash/lhash.h
+++ b/crypto/lhash/lhash.h
@@ -102,10 +102,16 @@ typedef struct lhash_st
unsigned long num_retrieve;
unsigned long num_retrieve_miss;
unsigned long num_hash_comps;
+
+ int error;
} LHASH;
#define LH_LOAD_MULT 256
+/* Indicates a malloc() error in the last call, this is only bad
+ * in lh_insert(). */
+#define lh_error(lh) ((lh)->error)
+
#ifndef NOPROTO
LHASH *lh_new(unsigned long (*h)(), int (*c)());
void lh_free(LHASH *lh);