[Commits] [SCM] claws branch, master, updated. 3.14.1-149-g9657f8b
wwp at claws-mail.org
wwp at claws-mail.org
Wed Jan 18 21:51:36 CET 2017
The branch, master has been updated
via 9657f8bebce60d1cf16061a4fee139e2bb9def9e (commit)
from ff51eec7ab27e5a5766e586ae03f9ef89a47aa39 (commit)
Summary of changes:
src/compose.c | 4 +---
src/procheader.c | 10 +++++-----
2 files changed, 6 insertions(+), 8 deletions(-)
- Log -----------------------------------------------------------------
commit 9657f8bebce60d1cf16061a4fee139e2bb9def9e
Author: wwp <wwp at free.fr>
Date: Wed Jan 18 21:48:50 2017 +0100
Fix bug 3762, 'redirect fails'
by removing an check added at 3.14.1.39-g989b3a3, thought I was hardening
sanity checks and I changed the logics, making it fail while in normal
situation. Removed few more extraneous checks.
diff --git a/src/compose.c b/src/compose.c
index 25390c6..07bdeaf 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -5543,8 +5543,6 @@ static gint compose_redirect_write_to_file(Compose *compose, FILE *fdest)
if (g_ascii_strncasecmp(buf, not_included[i],
strlen(not_included[i])) == 0) {
skip = TRUE;
- g_free(buf);
- buf = NULL;
break;
}
}
@@ -5588,7 +5586,7 @@ static gint compose_redirect_write_to_file(Compose *compose, FILE *fdest)
goto error;
}
- if (err || ret == -1)
+ if (err)
goto error;
if (compose_redirect_write_headers(compose, fdest))
diff --git a/src/procheader.c b/src/procheader.c
index f09cf9c..ae54f6e 100644
--- a/src/procheader.c
+++ b/src/procheader.c
@@ -135,7 +135,7 @@ static gint generic_get_one_field(gchar **bufptr, void *data,
size_t len;
gchar *buf;
-/* cm_return_val_if_fail(bufptr != NULL, -1); TODO */
+ cm_return_val_if_fail(bufptr != NULL, -1);
len = BUFFSIZE;
buf = g_malloc(len);
@@ -269,7 +269,7 @@ GPtrArray *procheader_get_header_array_asis(FILE *fp)
headers = g_ptr_array_new();
- while (procheader_get_one_field_asis(&buf, fp) != -1 && buf != NULL) {
+ while (procheader_get_one_field_asis(&buf, fp) != -1) {
if ((header = procheader_parse_header(buf)) != NULL)
g_ptr_array_add(headers, header);
g_free(buf);
@@ -390,7 +390,7 @@ void procheader_get_header_fields(FILE *fp, HeaderEntry hentry[])
if (hentry == NULL) return;
- while ((hnum = procheader_get_one_field(&buf, fp, hentry)) != -1 && buf != NULL) {
+ while ((hnum = procheader_get_one_field(&buf, fp, hentry)) != -1) {
hp = hentry + hnum;
p = buf + strlen(hp->name);
@@ -579,7 +579,7 @@ static MsgInfo *parse_stream(void *data, gboolean isstring, MsgFlags flags,
hentry = procheader_get_headernames(full);
if (MSG_IS_QUEUED(flags) || MSG_IS_DRAFT(flags)) {
- while (get_one_field(&buf, data, NULL) != -1 && buf != NULL) {
+ while (get_one_field(&buf, data, NULL) != -1) {
if ((!strncmp(buf, "X-Claws-End-Special-Headers: 1",
strlen("X-Claws-End-Special-Headers:"))) ||
(!strncmp(buf, "X-Sylpheed-End-Special-Headers: 1",
@@ -619,7 +619,7 @@ static MsgInfo *parse_stream(void *data, gboolean isstring, MsgFlags flags,
avatar_hook_id = 0;
}
- while ((hnum = get_one_field(&buf, data, hentry)) != -1 && buf != NULL) {
+ while ((hnum = get_one_field(&buf, data, hentry)) != -1) {
hp = buf + strlen(hentry[hnum].name);
while (*hp == ' ' || *hp == '\t') hp++;
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list