aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-04-27 16:07:13 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-04-27 16:07:13 +0100
commit31a7f47219c9a1d14ef666e46790b306f172d814 (patch)
tree76de5ea2ce8c6809162a9aa57e0fca0abf20cf7d
parent1ed9f282a568ef64372f687dba5ca25033b0ce2b (diff)
downloadrspamd-31a7f47219c9a1d14ef666e46790b306f172d814.tar.gz
rspamd-31a7f47219c9a1d14ef666e46790b306f172d814.zip
[Fix] Fix varargs loop
-rw-r--r--src/libmime/message.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c
index 14dd24a7f..d23862896 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -2036,7 +2036,8 @@ rspamd_message_get_headers_array (struct rspamd_task *task, ...)
va_start (ap, task);
- for (hname = va_arg (ap, const char *); hname != NULL;) {
+ for (hname = va_arg (ap, const char *); hname != NULL;
+ hname = va_arg (ap, const char *)) {
rh = g_hash_table_lookup (task->raw_headers, hname);
if (rh == NULL) {
@@ -2058,7 +2059,8 @@ rspamd_message_get_headers_array (struct rspamd_task *task, ...)
/* Restart varargs processing */
va_start (ap, task);
- for (hname = va_arg (ap, const char *); hname != NULL;) {
+ for (hname = va_arg (ap, const char *); hname != NULL;
+ hname = va_arg (ap, const char *)) {
rh = g_hash_table_lookup (task->raw_headers, hname);
if (rh == NULL) {
@@ -2127,7 +2129,8 @@ rspamd_message_get_headers_array_str (struct rspamd_task *task, ...)
va_start (ap, task);
- for (hname = va_arg (ap, const char *); hname != NULL;) {
+ for (hname = va_arg (ap, const char *); hname != NULL;
+ hname = va_arg (ap, const char *)) {
rh = g_hash_table_lookup (task->raw_headers, hname);
if (rh == NULL) {
@@ -2149,7 +2152,8 @@ rspamd_message_get_headers_array_str (struct rspamd_task *task, ...)
/* Restart varargs processing */
va_start (ap, task);
- for (hname = va_arg (ap, const char *); hname != NULL;) {
+ for (hname = va_arg (ap, const char *); hname != NULL;
+ hname = va_arg (ap, const char *)) {
rh = g_hash_table_lookup (task->raw_headers, hname);
if (rh == NULL) {