diff options
author | Martin Willi <martin@strongswan.org> | 2008-12-05 12:34:17 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2008-12-05 12:34:17 +0000 |
commit | d21b3549f772028e78aef368d187bc8415cb8a39 (patch) | |
tree | 032177ed00d4068f960b111e450e2c1683efd3ec /src/libstrongswan/utils/hashtable.c | |
parent | 19e0010f51f871f9eb8e3c0b2bc451d7f32e556c (diff) | |
download | strongswan-d21b3549f772028e78aef368d187bc8415cb8a39.tar.bz2 strongswan-d21b3549f772028e78aef368d187bc8415cb8a39.tar.xz |
accept NULL values in hashtable enumerator
Diffstat (limited to 'src/libstrongswan/utils/hashtable.c')
-rw-r--r-- | src/libstrongswan/utils/hashtable.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libstrongswan/utils/hashtable.c b/src/libstrongswan/utils/hashtable.c index 974292123..6b53ec261 100644 --- a/src/libstrongswan/utils/hashtable.c +++ b/src/libstrongswan/utils/hashtable.c @@ -332,8 +332,14 @@ static bool enumerate(private_enumerator_t *this, void **key, void **value) if (this->current->enumerate(this->current, &pair)) { - *key = pair->key; - *value = pair->value; + if (key) + { + *key = pair->key; + } + if (value) + { + *value = pair->value; + } return TRUE; } this->current->destroy(this->current); |