Commit bef9b74e bef9b74e4404fd9537b1495cec66721f6833ad5d by Sergey Poznyakoff

Minor fixes

1 parent e2c1ea6b
......@@ -19,6 +19,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <mailutils/error.h>
#include <mailutils/errno.h>
#include <mailutils/url.h>
......
......@@ -789,13 +789,12 @@ void
cond_before (struct parsebuf *pb)
{
time_t t = (time_t)_search_arg (pb);
time_t mesg_time;
time_t mesg_time = 0;
const char *date;
mu_envelope_t env;
mu_message_get_envelope (pb->msg, &env);
if (mu_envelope_sget_date (env, &date))
return 0;
if (mu_envelope_sget_date (env, &date) == 0)
util_parse_ctime_date (date, &mesg_time);
_search_push (pb, mesg_time < t);
}
......@@ -859,13 +858,12 @@ void
cond_on (struct parsebuf *pb)
{
time_t t = (time_t)_search_arg (pb);
time_t mesg_time;
time_t mesg_time = 0;
const char *date;
mu_envelope_t env;
mu_message_get_envelope (pb->msg, &env);
if (mu_envelope_sget_date (env, &date))
return 0;
if (mu_envelope_sget_date (env, &date) == 0)
util_parse_ctime_date (date, &mesg_time);
_search_push (pb, t <= mesg_time && mesg_time <= t + 86400);
}
......@@ -904,13 +902,12 @@ void
cond_since (struct parsebuf *pb)
{
time_t t = (time_t)_search_arg (pb);
time_t mesg_time;
time_t mesg_time = 0;
const char *date;
mu_envelope_t env;
mu_message_get_envelope (pb->msg, &env);
if (mu_envelope_sget_date (env, &date))
return 0;
if (mu_envelope_sget_date (env, &date) == 0)
util_parse_ctime_date (date, &mesg_time);
_search_push (pb, mesg_time >= t);
}
......
......@@ -139,7 +139,6 @@ int
_folder_mbox_init (mu_folder_t folder)
{
fmbox_t dfolder;
size_t name_len = 0;
int status = 0;
/* We create an authority so the API is uniform across the mailbox
......
......@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <string.h>
#include <mailutils/errno.h>
#include <mailutils/mutil.h>
#include <envelope0.h>
int
......
......@@ -402,7 +402,8 @@ _add_module_list (const char *modlist, int (*fun)(const char *name))
if (errno == ENOENT)
mu_error ("no such module: %s", name);
else
mu_error ("failed to add module %s: %s", strerror (errno));
mu_error ("failed to add module %s: %s",
name, strerror (errno));
exit (1);
}
}
......