]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-mail: start relying on mail_html2text_deinit(NULL) being a no-op
authorJosef 'Jeff' Sipek <jeff.sipek@dovecot.fi>
Mon, 29 Jan 2018 13:38:45 +0000 (08:38 -0500)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 12 Mar 2018 09:58:54 +0000 (11:58 +0200)
Cleanup performed with the following semantic patch:

@@
expression E;
@@

- if (E != NULL) {
-       mail_html2text_deinit(&E);
- }
+ mail_html2text_deinit(&E);

src/lib-mail/message-snippet.c

index 8632b33dc54d0ade725ac53f277aaea412915a09..b42800a252f68eb2e882d404e69ca044a044729c 100644 (file)
@@ -138,8 +138,7 @@ int message_snippet_generate(struct istream *input,
        i_assert(ret != 0);
        message_decoder_deinit(&decoder);
        message_parser_deinit(&parser, &parts);
-       if (ctx.html2text != NULL)
-               mail_html2text_deinit(&ctx.html2text);
+       mail_html2text_deinit(&ctx.html2text);
        pool_unref(&pool);
        return input->stream_errno == 0 ? 0 : -1;
 }