From: Heikki Levanto Date: Thu, 19 Dec 2013 13:58:11 +0000 (+0100) Subject: Remove unnecessary check from reclist enter/leave X-Git-Tag: v1.6.38~8 X-Git-Url: http://git.indexdata.com/?p=pazpar2-moved-to-github.git;a=commitdiff_plain;h=40c4f55c2aa5ce6d912516b3030eb9f82b78b399 Remove unnecessary check from reclist enter/leave These used to check that the reclist pointer was not null, but only after dereferencing it once... --- 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; }