summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/csmap_find.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-03-22 17:32:21 +0100
committerTyge Løvset <[email protected]>2023-03-22 17:32:21 +0100
commite6a25eaaf4687ff99d0d719d0b32ad512156039e (patch)
tree6bc1730f6882eb054c6472361487a0be8b85c7aa /misc/examples/csmap_find.c
parent66429475ed6ac0deaba85989174e8880762d7888 (diff)
downloadSTC-modified-e6a25eaaf4687ff99d0d719d0b32ad512156039e.tar.gz
STC-modified-e6a25eaaf4687ff99d0d719d0b32ad512156039e.zip
Added c_foreach_r() macro for reverse iter of cvec, cdeq, cstack.
Moved c_find_if, c_erase_if, c_eraseremove_if to algo/filter.h Internals.
Diffstat (limited to 'misc/examples/csmap_find.c')
-rw-r--r--misc/examples/csmap_find.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/examples/csmap_find.c b/misc/examples/csmap_find.c
index fe5558e2..863cdea0 100644
--- a/misc/examples/csmap_find.c
+++ b/misc/examples/csmap_find.c
@@ -33,7 +33,7 @@ void findit(csmap_istr c, csmap_istr_key val)
{
printf("Trying find() on value %d\n", val);
csmap_istr_iter result = csmap_istr_find(&c, val); // prefer contains() or get()
- if (result.ref != csmap_istr_end(&c).ref) {
+ if (result.ref) {
printf("Element found: "); print_elem(csmap_istr_value_toraw(result.ref)); puts("");
} else {
puts("Element not found.");