]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-mail: message-snippet - Use i_isspace
authorAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 29 Oct 2019 11:44:50 +0000 (13:44 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 5 Nov 2019 11:54:01 +0000 (13:54 +0200)
This way we catch all the whitespace

src/lib-mail/message-snippet.c

index 837edd22ef61e2358532e380edd12f8591bc1dd5..560e499b04f1640ebd649fa1ce39bf85d85637d1 100644 (file)
@@ -50,8 +50,7 @@ static void snippet_add_content(struct snippet_context *ctx,
                /* skip NULs without increasing snippet size */
                return;
        }
-       if (data[0] == '\r' || data[0] == '\n' ||
-           data[0] == '\t' || data[0] == ' ') {
+       if (i_isspace(*data)) {
                /* skip any leading whitespace */
                if (str_len(target->snippet) > 1)
                        ctx->add_whitespace = TRUE;