Mercurial > dovecot > original-hg > dovecot-1.2
changeset 3977:dcd4e8ccd639 HEAD
Minor cleanup / comment update
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 05 Feb 2006 09:19:24 +0200 |
parents | 7272c083dca8 |
children | 6f21ccb60df4 |
files | src/imap/imap-sort.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/imap-sort.c Thu Feb 02 23:31:29 2006 +0200 +++ b/src/imap/imap-sort.c Sun Feb 05 09:19:24 2006 +0200 @@ -55,7 +55,7 @@ static void mail_sort_input(struct sort_context *ctx, struct mail *mail); static void mail_sort_flush(struct sort_context *ctx); -static enum mail_sort_type +static void mail_sort_normalize(const enum mail_sort_type *input, buffer_t *output) { enum mail_sort_type type, mask = 0; @@ -83,8 +83,6 @@ type = MAIL_SORT_END; buffer_append(output, &type, sizeof(type)); - - return mask; } static enum mail_sort_type @@ -205,7 +203,9 @@ ctx = t_new(struct sort_context, 1); - /* normalize sorting program */ + /* normalize sorting program. note that although we're using a hard + buffer size here, it shouldn't be possible to overflow it since + the normalized sort program can't exceed MAX_SORT_PROGRAM_SIZE. */ buf = buffer_create_data(pool_datastack_create(), norm_prog, sizeof(norm_prog)); mail_sort_normalize(sort_program, buf);