aboutsummaryrefslogtreecommitdiffstats
path: root/src/dumm/cowfs.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2017-05-16 12:11:24 +0200
committerTobias Brunner <tobias@strongswan.org>2017-05-26 13:56:44 +0200
commit2e4d110d1e94a3be9da06894832492ff469eec37 (patch)
treedb62e4fcd1a955b5179c6f172a9403500bb24e50 /src/dumm/cowfs.c
parent8a2e4d4a8b87f5e8a5e5f663ee8eddd47988fa2c (diff)
downloadstrongswan-2e4d110d1e94a3be9da06894832492ff469eec37.tar.bz2
strongswan-2e4d110d1e94a3be9da06894832492ff469eec37.tar.xz
linked-list: Change return value of find_first() and signature of its callback
This avoids the unportable five pointer hack.
Diffstat (limited to 'src/dumm/cowfs.c')
-rw-r--r--src/dumm/cowfs.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/dumm/cowfs.c b/src/dumm/cowfs.c
index 28c62c217..5332ba551 100644
--- a/src/dumm/cowfs.c
+++ b/src/dumm/cowfs.c
@@ -92,11 +92,12 @@ static void overlay_destroy(overlay_t *this)
free(this);
}
-/**
- * compare two overlays by path
- */
-static bool overlay_equals(overlay_t *this, overlay_t *other)
+CALLBACK(overlay_equals, bool,
+ overlay_t *this, va_list args)
{
+ overlay_t *other;
+
+ VA_ARGS_VGET(args, other);
return streq(this->path, other->path);
}
@@ -108,8 +109,8 @@ static bool overlay_remove(private_cowfs_t *this, char *path)
{
overlay_t over, *current;
over.path = path;
- if (this->overlays->find_first(this->overlays,
- (linked_list_match_t)overlay_equals, (void**)&current, &over) != SUCCESS)
+ if (!this->overlays->find_first(this->overlays, overlay_equals,
+ (void**)&current, &over))
{
return FALSE;
}