projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b794c27
)
Fix a few Coverity issues
author
Colin Leroy
<colin@colino.net>
Wed, 31 Aug 2016 15:11:24 +0000
(17:11 +0200)
committer
Colin Leroy
<colin@colino.net>
Wed, 31 Aug 2016 15:11:24 +0000
(17:11 +0200)
src/editaddress.c
patch
|
blob
|
history
src/etpan/imap-thread.c
patch
|
blob
|
history
src/filtering.c
patch
|
blob
|
history
src/gtk/gtkcmctree.c
patch
|
blob
|
history
src/gtk/gtksctree.c
patch
|
blob
|
history
src/mbox.c
patch
|
blob
|
history
src/messageview.c
patch
|
blob
|
history
src/mh.c
patch
|
blob
|
history
diff --git
a/src/editaddress.c
b/src/editaddress.c
index 22572b1cd960ec8d5d4c20f9de427177758c8c8c..e1b5534b8d54276e56226aa63e50c0c50698a5c2 100644
(file)
--- a/
src/editaddress.c
+++ b/
src/editaddress.c
@@
-1559,7
+1559,7
@@
static gboolean addressbook_edit_person_close( gboolean cancelled )
listEMail = NULL;
listAttrib = NULL;
listEMail = NULL;
listAttrib = NULL;
- if(
! cancelled
) {
+ if(
!cancelled && current_person != NULL
) {
/* Set current_person stuff */
gchar *name;
/* Set current_person stuff */
gchar *name;
diff --git
a/src/etpan/imap-thread.c
b/src/etpan/imap-thread.c
index 6af12b12ef7068d96bee31fb552ee7139581d100..4bfa537c523bee6aab898d2b05f15704d7f389cf 100644
(file)
--- a/
src/etpan/imap-thread.c
+++ b/
src/etpan/imap-thread.c
@@
-2869,7
+2869,12
@@
imap_get_envelopes_list(mailimap * imap, struct mailimap_set * set,
r = imap_add_envelope_fetch_att(fetch_type);
else
r = imap_add_header_fetch_att(fetch_type);
r = imap_add_envelope_fetch_att(fetch_type);
else
r = imap_add_header_fetch_att(fetch_type);
-
+
+ if (r != MAILIMAP_NO_ERROR) {
+ debug_print("add fetch attr: %d\n", r);
+ return r;
+ }
+
mailstream_logger = imap_logger_fetch;
r = mailimap_uid_fetch(imap, set, fetch_type, &fetch_result);
mailstream_logger = imap_logger_fetch;
r = mailimap_uid_fetch(imap, set, fetch_type, &fetch_result);
diff --git
a/src/filtering.c
b/src/filtering.c
index 794b529bbbfb378b47eaf85899a5eaf1122a7a52..7b604a8e596e04588bb6b989b63d84cc6add04c1 100644
(file)
--- a/
src/filtering.c
+++ b/
src/filtering.c
@@
-237,7
+237,7
@@
void filtering_move_and_copy_msgs(GSList *msgs)
} else {
debug_print("%d messages to %s in %s\n", found,
cur_op==IS_COPY ? "copy":(cur_op==IS_DELE ?"delete":"move"),
} else {
debug_print("%d messages to %s in %s\n", found,
cur_op==IS_COPY ? "copy":(cur_op==IS_DELE ?"delete":"move"),
- last_item
?(last_item->name ? last_item->name:"(noname)"):"nowhere
");
+ last_item
->name ? last_item->name:"(noname)
");
}
for (cur = batch; cur; cur = cur->next) {
MsgInfo *info = (MsgInfo *)cur->data;
}
for (cur = batch; cur; cur = cur->next) {
MsgInfo *info = (MsgInfo *)cur->data;
diff --git
a/src/gtk/gtkcmctree.c
b/src/gtk/gtkcmctree.c
index f8f80a6422aceed26b19b37aac34ea8b98dbcf57..d1d587df5618b923aa3c5a3e8f04d6a3b779a83d 100644
(file)
--- a/
src/gtk/gtkcmctree.c
+++ b/
src/gtk/gtkcmctree.c
@@
-1556,7
+1556,7
@@
gtk_cmctree_link (GtkCMCTree *ctree,
list_end->next = work->next;
if (work->next)
list_end->next = work->next;
if (work->next)
-
list =
work->next->prev = list_end;
+ work->next->prev = list_end;
work->next = (GList *)node;
list = (GList *)node;
list->prev = work;
work->next = (GList *)node;
list = (GList *)node;
list->prev = work;
diff --git
a/src/gtk/gtksctree.c
b/src/gtk/gtksctree.c
index b7a86ee760578066d48fdff0af43a07fb889bf27..4519657d2fc7dee0ef216f6272f2efe980f259ca 100644
(file)
--- a/
src/gtk/gtksctree.c
+++ b/
src/gtk/gtksctree.c
@@
-1451,7
+1451,7
@@
gtk_sctree_link (GtkCMCTree *ctree,
list_end->next = work->next;
if (work->next)
list_end->next = work->next;
if (work->next)
-
list =
work->next->prev = list_end;
+ work->next->prev = list_end;
work->next = (GList *)node;
list = (GList *)node;
list->prev = work;
work->next = (GList *)node;
list = (GList *)node;
list->prev = work;
diff --git
a/src/mbox.c
b/src/mbox.c
index 6b8ad38b664381a291c417a86872ee183c8bf2a3..c0846020092149c08f57a03c92a66358863d6c37 100644
(file)
--- a/
src/mbox.c
+++ b/
src/mbox.c
@@
-495,10
+495,6
@@
gint copy_mbox(gint srcfd, const gchar *dest)
}
while ((n_read = read(srcfd, buf, sizeof(buf))) > 0) {
}
while ((n_read = read(srcfd, buf, sizeof(buf))) > 0) {
- if (n_read == -1 && errno != 0) {
- save_errno = errno;
- break;
- }
if (fwrite(buf, 1, n_read, dest_fp) < n_read) {
g_warning("writing to %s failed.", dest);
fclose(dest_fp);
if (fwrite(buf, 1, n_read, dest_fp) < n_read) {
g_warning("writing to %s failed.", dest);
fclose(dest_fp);
diff --git
a/src/messageview.c
b/src/messageview.c
index 9d456c46ddcb40dff2969e621d4e280b44ff58cb..e0c0d30202a241108dd23ee476826dfe9fa4e0d6 100644
(file)
--- a/
src/messageview.c
+++ b/
src/messageview.c
@@
-2642,9
+2642,7
@@
static void goto_unread_folder_cb(GtkAction *action, gpointer data)
static void goto_folder_cb(GtkAction *action, gpointer data)
{
MessageView *messageview = (MessageView *)data;
static void goto_folder_cb(GtkAction *action, gpointer data)
{
MessageView *messageview = (MessageView *)data;
- messageview->updating = TRUE;
FolderItem *to_folder;
FolderItem *to_folder;
- messageview->updating = FALSE;
to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_ALL, NULL, FALSE);
to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_ALL, NULL, FALSE);
diff --git
a/src/mh.c
b/src/mh.c
index 2ed2289ca19c7b4f997203f268c759655d9716ac..3798c64cc6d3c496da6afd809979a5a8ee41b16a 100644
(file)
--- a/
src/mh.c
+++ b/
src/mh.c
@@
-226,7
+226,7
@@
gboolean mh_scan_required(Folder *folder, FolderItem *item)
if ((s.st_mtime > item->mtime) &&
(s.st_mtime - 3600 != item->mtime)) {
debug_print("MH scan required, folder updated: %s (%ld > %ld)\n",
if ((s.st_mtime > item->mtime) &&
(s.st_mtime - 3600 != item->mtime)) {
debug_print("MH scan required, folder updated: %s (%ld > %ld)\n",
- path
?path:"(null)"
,
+ path,
(long int) s.st_mtime,
(long int) item->mtime);
g_free(path);
(long int) s.st_mtime,
(long int) item->mtime);
g_free(path);
@@
-234,7
+234,7
@@
gboolean mh_scan_required(Folder *folder, FolderItem *item)
}
debug_print("MH scan not required: %s (%ld <= %ld)\n",
}
debug_print("MH scan not required: %s (%ld <= %ld)\n",
- path
?path:"(null)"
,
+ path,
(long int) s.st_mtime,
(long int) item->mtime);
g_free(path);
(long int) s.st_mtime,
(long int) item->mtime);
g_free(path);