aboutsummaryrefslogtreecommitdiff
path: root/trie.inc.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-03-04 18:31:00 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-03-04 18:31:00 +0100
commit7bc58226a529293c42e82eba3b37eecf7f5978c7 (patch)
tree63a4db9de4870eb5cc00266ce85755e83966c1ab /trie.inc.h
parentChange vendor attribute from HH to HNH. (diff)
downloadcalp-7bc58226a529293c42e82eba3b37eecf7f5978c7.tar.gz
calp-7bc58226a529293c42e82eba3b37eecf7f5978c7.tar.xz
set-attr! can now add new keys.
Diffstat (limited to 'trie.inc.h')
-rw-r--r--trie.inc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/trie.inc.h b/trie.inc.h
index 20cc93b5..ffc8ac8e 100644
--- a/trie.inc.h
+++ b/trie.inc.h
@@ -88,6 +88,8 @@ TYPE* GET(TRIE(TYPE)) ( TRIE(TYPE)* trie, char* key ) {
while (n != NULL) {
if (subkey[1] == '\0') {
+ /* Wanted node found,
+ * value can however be NULL */
return n->value;
} else if (subkey[0] == n->c) {
n = n->child;
@@ -97,7 +99,7 @@ TYPE* GET(TRIE(TYPE)) ( TRIE(TYPE)* trie, char* key ) {
}
}
- ERR("Position not found");
+ /* Position not found */
return 0;
}