From 937f2b345aa76272a1c80828e7666ab87611c0d1 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Thu, 27 Sep 2018 11:43:02 +0200 Subject: 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 Signed-off-by: Dimitri Staessens --- src/lib/timerwheel.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/lib/timerwheel.c') 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) -- cgit v1.2.3