isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 67f4aeff1febc9bf750a927052c467fee15ba276
parent 743968737c5e296fb5c7d0d2dc1de091cc84c0d7
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Thu, 29 Dec 2016 14:10:35 +0100

standardize on 'int' for message sizes

that's what the sources already assumed anyway. size_t is total
overkill, as No Email Ever (TM) will exceed 2GiB.

this also fixes a harmless format string warning in 32 bit builds.

Diffstat:
Msrc/driver.h | 4++--
Msrc/sync.c | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/driver.h b/src/driver.h @@ -39,7 +39,7 @@ typedef struct store_conf { const char *flat_delim; const char *map_inbox; const char *trash; - uint max_size; /* off_t is overkill */ + int max_size; /* off_t is overkill */ char trash_remote_new, trash_only_new; } store_conf_t; @@ -64,7 +64,7 @@ typedef struct message { struct message *next; struct sync_rec *srec; /* string_list_t *keywords; */ - size_t size; /* zero implies "not fetched" */ + int size; /* zero implies "not fetched" */ int uid; uchar flags, status; char tuid[TUIDL]; diff --git a/src/sync.c b/src/sync.c @@ -1369,7 +1369,7 @@ box_loaded( int sts, void *aux ) uid = tmsg->uid; if (DFlags & DEBUG_SYNC) { make_flags( tmsg->flags, fbuf ); - printf( svars->ctx[t]->opts & OPEN_SIZE ? " message %5d, %-4s, %6lu: " : " message %5d, %-4s: ", uid, fbuf, tmsg->size ); + printf( svars->ctx[t]->opts & OPEN_SIZE ? " message %5d, %-4s, %6d: " : " message %5d, %-4s: ", uid, fbuf, tmsg->size ); } idx = (uint)((uint)uid * 1103515245U) % hashsz; while (srecmap[idx].uid) {