summaryrefslogtreecommitdiff
path: root/src/lib/cdap.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-21 20:13:41 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-22 13:27:02 +0200
commit3cafbf3cfe5c58a6988dbfc4c29148ebb804f5c2 (patch)
tree881da180b8d801c38ba0fbad2fc9f387a70ec016 /src/lib/cdap.c
parentd5a52f3951fff7ee272bd0d4cd95cd122d07fa64 (diff)
downloadouroboros-3cafbf3cfe5c58a6988dbfc4c29148ebb804f5c2.tar.gz
ouroboros-3cafbf3cfe5c58a6988dbfc4c29148ebb804f5c2.zip
build: Compile with strict conversion
This has the code checked with -Wcast-qual and -Wconversion flags. These flags were removed because SWIG generated code fails.
Diffstat (limited to 'src/lib/cdap.c')
-rw-r--r--src/lib/cdap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/cdap.c b/src/lib/cdap.c
index 92a05221..4a6408f6 100644
--- a/src/lib/cdap.c
+++ b/src/lib/cdap.c
@@ -56,13 +56,14 @@ static int next_invoke_id(struct cdap * instance)
pthread_mutex_lock(&instance->ids_lock);
ret = bmp_allocate(instance->ids);
+ if (!bmp_is_id_valid(instance->ids, ret))
+ ret = -1; /* INVALID_INVOKE_ID */
pthread_mutex_unlock(&instance->ids_lock);
return ret;
}
-static int release_invoke_id(struct cdap * instance,
- int id)
+static int release_invoke_id(struct cdap * instance, int id)
{
int ret;