From 63fd16b20c49b3f32b6c104b97e095b51fd12451 Mon Sep 17 00:00:00 2001 From: Josef 'Jeff' Sipek Date: Thu, 20 Sep 2018 06:32:46 -0400 Subject: [PATCH] global: Use uint32_t for pop3 order --- src/doveadm/dsync/dsync-ibc-stream.c | 2 +- src/doveadm/dsync/dsync-mail.c | 2 +- src/doveadm/dsync/dsync-mail.h | 2 +- src/lib-storage/mail-storage-private.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/doveadm/dsync/dsync-ibc-stream.c b/src/doveadm/dsync/dsync-ibc-stream.c index 1bb7d30f7f..9396f45133 100644 --- a/src/doveadm/dsync/dsync-ibc-stream.c +++ b/src/doveadm/dsync/dsync-ibc-stream.c @@ -1948,7 +1948,7 @@ dsync_ibc_stream_recv_mail(struct dsync_ibc *_ibc, struct dsync_mail **mail_r) if (dsync_deserializer_decode_try(decoder, "pop3_uidl", &value)) mail->pop3_uidl = p_strdup(pool, value); if (dsync_deserializer_decode_try(decoder, "pop3_order", &value) && - str_to_uint(value, &mail->pop3_order) < 0) { + str_to_uint32(value, &mail->pop3_order) < 0) { dsync_ibc_input_error(ibc, decoder, "Invalid pop3_order"); return DSYNC_IBC_RECV_RET_TRYAGAIN; } diff --git a/src/doveadm/dsync/dsync-mail.c b/src/doveadm/dsync/dsync-mail.c index 72626ce4e3..2a009a9577 100644 --- a/src/doveadm/dsync/dsync-mail.c +++ b/src/doveadm/dsync/dsync-mail.c @@ -101,7 +101,7 @@ int dsync_mail_fill_nonminimal(struct mail *mail, struct dsync_mail *dmail_r, return -1; } if (*str != '\0') { - if (str_to_uint(str, &dmail_r->pop3_order) < 0) + if (str_to_uint32(str, &dmail_r->pop3_order) < 0) i_unreached(); } if (mail_get_received_date(mail, &dmail_r->received_date) < 0) { diff --git a/src/doveadm/dsync/dsync-mail.h b/src/doveadm/dsync/dsync-mail.h index a18a7db7b7..9d577f2961 100644 --- a/src/doveadm/dsync/dsync-mail.h +++ b/src/doveadm/dsync/dsync-mail.h @@ -24,7 +24,7 @@ struct dsync_mail { bool minimal_fields; const char *pop3_uidl; - unsigned int pop3_order; + uint32_t pop3_order; time_t received_date; /* Input stream containing the message text, or NULL if all instances of the message were already expunged from this mailbox. */ diff --git a/src/lib-storage/mail-storage-private.h b/src/lib-storage/mail-storage-private.h index c089659a65..17a4b97b45 100644 --- a/src/lib-storage/mail-storage-private.h +++ b/src/lib-storage/mail-storage-private.h @@ -667,7 +667,7 @@ struct mail_save_data { uint32_t uid, stub_seq; char *guid, *pop3_uidl, *from_envelope; - unsigned int pop3_order; + uint32_t pop3_order; struct ostream *output; struct mail_save_attachment *attach; -- 2.47.3