From: Josef 'Jeff' Sipek Date: Tue, 12 Dec 2017 16:10:15 +0000 (-0500) Subject: global: io_remove*(NULL) is a no-op X-Git-Tag: 2.3.0.rc1~120 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4afd5b65670e52e1d513e707c96d626ab1856e03;p=thirdparty%2Fdovecot%2Fcore.git global: io_remove*(NULL) is a no-op --- diff --git a/src/lib-ldap/ldap-connection.c b/src/lib-ldap/ldap-connection.c index 1019072f90..6ac4c61673 100644 --- a/src/lib-ldap/ldap-connection.c +++ b/src/lib-ldap/ldap-connection.c @@ -548,8 +548,7 @@ int ldap_connection_connect(struct ldap_connection *conn) void ldap_connection_kill(struct ldap_connection *conn) { - if (conn->io != NULL) - io_remove_closed(&(conn->io)); + io_remove_closed(&(conn->io)); timeout_remove(&(conn->to_disconnect)); timeout_remove(&(conn->to_reconnect)); if (conn->request_queue != NULL) { diff --git a/src/lib-master/master-service.c b/src/lib-master/master-service.c index f45610e556..c2d6890206 100644 --- a/src/lib-master/master-service.c +++ b/src/lib-master/master-service.c @@ -1182,8 +1182,7 @@ void master_status_update(struct master_service *service) service->last_sent_status_avail_count) { /* a) closed, b) updating to same state */ timeout_remove(&service->to_status); - if (service->io_status_write != NULL) - io_remove(&service->io_status_write); + io_remove(&service->io_status_write); return; } if (ioloop_time == service->last_sent_status_time &&