aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-06-18 10:42:37 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-06-18 10:42:37 +0800
commite286346c8dfa7926b2384791bb868c36983052c0 (patch)
tree9ea89840dcf02d27e679f4041a4b877958b69d0e /camel/providers
parenta18f28aa035f59acc0a3119528034e482168bd5a (diff)
downloadgsoc2013-evolution-e286346c8dfa7926b2384791bb868c36983052c0.tar
gsoc2013-evolution-e286346c8dfa7926b2384791bb868c36983052c0.tar.gz
gsoc2013-evolution-e286346c8dfa7926b2384791bb868c36983052c0.tar.bz2
gsoc2013-evolution-e286346c8dfa7926b2384791bb868c36983052c0.tar.lz
gsoc2013-evolution-e286346c8dfa7926b2384791bb868c36983052c0.tar.xz
gsoc2013-evolution-e286346c8dfa7926b2384791bb868c36983052c0.tar.zst
gsoc2013-evolution-e286346c8dfa7926b2384791bb868c36983052c0.zip
init tail->last to (guint32) -1, so that index = tail->last + 1 will start
2004-06-17 Jeffrey Stedfast <fejj@ximian.com> * providers/imap4/camel-imap4-folder.c (uidset_init): init tail->last to (guint32) -1, so that index = tail->last + 1 will start at 0 :-) svn path=/trunk/; revision=26405
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/imap4/camel-imap4-folder.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/camel/providers/imap4/camel-imap4-folder.c b/camel/providers/imap4/camel-imap4-folder.c
index c5b94af89d..e06b5ab563 100644
--- a/camel/providers/imap4/camel-imap4-folder.c
+++ b/camel/providers/imap4/camel-imap4-folder.c
@@ -343,10 +343,10 @@ static void
uidset_init (struct _uidset *uidset, CamelFolderSummary *summary, size_t maxlen)
{
uidset->ranges = g_new (struct _uidset_range, 1);
+ uidset->ranges->first = (guint32) -1;
+ uidset->ranges->last = (guint32) -1;
uidset->ranges->next = NULL;
uidset->ranges->buflen = 0;
- uidset->ranges->first = 0;
- uidset->ranges->last = 0;
uidset->tail = uidset->ranges;
uidset->summary = summary;
@@ -365,6 +365,7 @@ uidset_add (struct _uidset *uidset, CamelMessageInfo *info)
guint32 index;
char *colon;
+ /* Note: depends on integer overflow for initial tail->last value */
for (index = tail->last + 1; index < messages->len; index++) {
if (info == messages->pdata[index])
break;