From 40c4f55c2aa5ce6d912516b3030eb9f82b78b399 Mon Sep 17 00:00:00 2001 From: Heikki Levanto Date: Thu, 19 Dec 2013 14:58:11 +0100 Subject: [PATCH] Remove unnecessary check from reclist enter/leave These used to check that the reclist pointer was not null, but only after dereferencing it once... --- src/reclists.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/reclists.c b/src/reclists.c index 103eefd..a04230a 100644 --- a/src/reclists.c +++ b/src/reclists.c @@ -330,22 +330,19 @@ struct record_cluster *reclist_read_record(struct reclist *l) void reclist_enter(struct reclist *l) { yaz_mutex_enter(l->mutex); - if (l) - l->sorted_ptr = l->sorted_list; + l->sorted_ptr = l->sorted_list; } void reclist_leave(struct reclist *l) { yaz_mutex_leave(l->mutex); - if (l) - l->sorted_ptr = l->sorted_list; + l->sorted_ptr = l->sorted_list; } void reclist_rewind(struct reclist *l) { - if (l) - l->sorted_ptr = l->sorted_list; + l->sorted_ptr = l->sorted_list; } -- 1.7.10.4