talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 4f4eb49ebeec8ea6638eac2efdff7aff2b2d408d
parent e7dc27cfb0752e896174b4c18c41dbdc466b5ff9
Author: Colin Leroy <colin@colino.net>
Date:   Mon,  2 Jun 2014 14:37:24 +0200

Fix uninitialized variable

Diffstat:
Msrc/msgcache.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/msgcache.c b/src/msgcache.c @@ -803,7 +803,7 @@ void msgcache_read_mark(MsgCache *cache, const gchar *mark_file) gint map_len = -1; char *cache_data = NULL; struct stat st; - gboolean error; + gboolean error = FALSE; swapping = TRUE; @@ -868,7 +868,10 @@ void msgcache_read_mark(MsgCache *cache, const gchar *mark_file) while (fread(&num, sizeof(num), 1, fp) == 1) { if (swapping) num = bswap_32(num); - if (fread(&perm_flags, sizeof(perm_flags), 1, fp) != 1) break; + if (fread(&perm_flags, sizeof(perm_flags), 1, fp) != 1) { + error = TRUE; + break; + } if (swapping) perm_flags = bswap_32(perm_flags); msginfo = g_hash_table_lookup(cache->msgnum_table, &num);