From: Timo Sirainen Date: Thu, 28 Jul 2011 21:04:20 +0000 (+0300) Subject: lib-storage: Removed unnecessary NULL checks. X-Git-Tag: 2.0.14~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea48f355d2020b75d63f0cdfbbabe7fa059f8059;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Removed unnecessary NULL checks. --- diff --git a/src/lib-storage/index/index-storage.c b/src/lib-storage/index/index-storage.c index 70a144f510..4b8376cf63 100644 --- a/src/lib-storage/index/index-storage.c +++ b/src/lib-storage/index/index-storage.c @@ -204,8 +204,7 @@ int index_storage_mailbox_open(struct mailbox *box, bool move_to_memory) box->opened = TRUE; index_thread_mailbox_opened(box); - if (hook_mailbox_opened != NULL) - hook_mailbox_opened(box); + hook_mailbox_opened(box); if ((box->flags & MAILBOX_FLAG_OPEN_DELETED) == 0) { if (mail_index_is_deleted(box->index)) { diff --git a/src/lib-storage/mail-namespace.c b/src/lib-storage/mail-namespace.c index 745b7ff2f1..95381a2968 100644 --- a/src/lib-storage/mail-namespace.c +++ b/src/lib-storage/mail-namespace.c @@ -400,11 +400,9 @@ int mail_namespaces_init_location(struct mail_user *user, const char *location, } user->namespaces = ns; - if (hook_mail_namespaces_created != NULL) { - T_BEGIN { - hook_mail_namespaces_created(ns); - } T_END; - } + T_BEGIN { + hook_mail_namespaces_created(ns); + } T_END; return 0; }