summaryrefslogtreecommitdiff
path: root/src/lib/timerwheel.c
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2018-09-27 11:43:02 +0200
committerDimitri Staessens <[email protected]>2018-09-28 11:02:44 +0200
commit937f2b345aa76272a1c80828e7666ab87611c0d1 (patch)
tree7075a29558228d12b385ffaa488fe96b93e2584c /src/lib/timerwheel.c
parent656d1ffc2abdec309cd892b54b310da30fa08095 (diff)
downloadouroboros-937f2b345aa76272a1c80828e7666ab87611c0d1.tar.gz
ouroboros-937f2b345aa76272a1c80828e7666ab87611c0d1.zip
lib: Check return values init functions
This will check the return values of init functions so that the code is more robust. It also removes a duplicate init in the timerwheel, checks for buffer overflows in the RIB and checks string lengths. Signed-off-by: Sander Vrijders <[email protected]> Signed-off-by: Dimitri Staessens <[email protected]>
Diffstat (limited to 'src/lib/timerwheel.c')
-rw-r--r--src/lib/timerwheel.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/lib/timerwheel.c b/src/lib/timerwheel.c
index ef8489bf..0feda642 100644
--- a/src/lib/timerwheel.c
+++ b/src/lib/timerwheel.c
@@ -121,9 +121,6 @@ struct timerwheel * timerwheel_create(time_t resolution,
if (tw == NULL)
return NULL;
- if (pthread_mutex_init(&tw->lock, NULL))
- return NULL;
-
tw->elements = 1;
while (tw->elements < (size_t) max_delay / resolution)