diff options
author | Stef Walter <stefw@collabora.co.uk> | 2011-07-27 11:24:55 +0200 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2011-07-27 11:24:55 +0200 |
commit | 308a776372eb1560480fbfcb5ef9d918a7a1454f (patch) | |
tree | 97f650f4a829c16ef6146ac95c80a37edf6eca60 /p11-kit/pin.c | |
parent | 3bb86b72ca5882b1e5684db837c75df810f283c3 (diff) | |
download | p11-kit-308a776372eb1560480fbfcb5ef9d918a7a1454f.tar.gz |
Reimplement and remove apache licensed bits of code.
* Reimplement the various bits of the hash table that were
still based on the apache apr code. Use different algorithms
for hashing, lookup and other stuff.
* Use this as an opportunity to cleanup that code and make
it more legible.
https://bugzilla.redhat.com/show_bug.cgi?id=725905
Diffstat (limited to 'p11-kit/pin.c')
-rw-r--r-- | p11-kit/pin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/p11-kit/pin.c b/p11-kit/pin.c index e0016ec..f24005a 100644 --- a/p11-kit/pin.c +++ b/p11-kit/pin.c @@ -36,7 +36,7 @@ #define DEBUG_FLAG DEBUG_PIN #include "debug.h" -#include "hash.h" +#include "hashmap.h" #include "pkcs11.h" #include "p11-kit.h" #include "pin.h" @@ -146,7 +146,7 @@ typedef struct _PinfileCallback { * we can audit thread safety easier. */ static struct _Shared { - hash_t *pinfiles; + hashmap *pinfiles; } gl = { NULL }; static void* @@ -304,7 +304,7 @@ p11_kit_pin_unregister_callback (const char *pinfile, p11_kit_pin_callback callb } /* When there are no more pinfiles, get rid of the hash table */ - if (hash_count (gl.pinfiles) == 0) { + if (hash_size (gl.pinfiles) == 0) { hash_free (gl.pinfiles); gl.pinfiles = NULL; } |