From: Fred Morcos Date: Wed, 23 Apr 2025 07:21:54 +0000 (+0200) Subject: lib-mail: Use explicit boolean expressions to fix compile errors X-Git-Tag: 2.4.2~830 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=816a630aae4eca7cca0eb6cd1231741f3cdb7448;p=thirdparty%2Fdovecot%2Fcore.git lib-mail: Use explicit boolean expressions to fix compile errors --- diff --git a/src/lib-mail/message-part-data.c b/src/lib-mail/message-part-data.c index 4fe4f9c6cc..07c077953b 100644 --- a/src/lib-mail/message-part-data.c +++ b/src/lib-mail/message-part-data.c @@ -121,7 +121,7 @@ static bool message_part_get_attachment_filename( i_assert(data != NULL); /* Reject the message if the Content-Type is excluded. */ - if (settings && settings->content_type_filter != NULL && + if (settings != NULL && settings->content_type_filter != NULL && !message_part_has_content_types(part, settings->content_type_filter)) return FALSE; @@ -133,7 +133,7 @@ static bool message_part_get_attachment_filename( /* Accept Content-Disposition: inline only when a filename or Content-Type->name is available and if inlined attachments are not excluded */ - if ((!settings || !settings->exclude_inlined) && + if ((settings == NULL || !settings->exclude_inlined) && null_strcasecmp(data->content_disposition, "inline") == 0) return message_part_data_find_attachment_filename(data, FALSE, filename_r);