]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-mail: Use explicit boolean expressions to fix compile errors
authorFred Morcos <fred.morcos@open-xchange.com>
Wed, 23 Apr 2025 07:21:54 +0000 (09:21 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 23 Apr 2025 11:04:40 +0000 (13:04 +0200)
src/lib-mail/message-part-data.c

index 4fe4f9c6cc0265c1c89a3a790aee0db75905e108..07c077953b99c19e41d600dd66852ad73168c60e 100644 (file)
@@ -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);