diff options
author | Sander Vrijders <[email protected]> | 2016-10-22 11:33:20 +0000 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2016-10-22 11:33:20 +0000 |
commit | 727efbe0c5e61862a870c71a2857b28eece3d369 (patch) | |
tree | 881da180b8d801c38ba0fbad2fc9f387a70ec016 /src/lib/cdap.c | |
parent | 482c44232d4deda3f89a7d85fbad99c1c64e80ec (diff) | |
parent | 3cafbf3cfe5c58a6988dbfc4c29148ebb804f5c2 (diff) | |
download | ouroboros-727efbe0c5e61862a870c71a2857b28eece3d369.tar.gz ouroboros-727efbe0c5e61862a870c71a2857b28eece3d369.zip |
Merged in dstaesse/ouroboros/be-extra (pull request #268)
build: Comply with -Wextra compiler flag
Diffstat (limited to 'src/lib/cdap.c')
-rw-r--r-- | src/lib/cdap.c | 5 |
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; |