Commit bef9b74e bef9b74e4404fd9537b1495cec66721f6833ad5d by Sergey Poznyakoff

Minor fixes

1 parent e2c1ea6b
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
19 #include <stdlib.h> 19 #include <stdlib.h>
20 #include <stdio.h> 20 #include <stdio.h>
21 #include <string.h> 21 #include <string.h>
22 #include <mailutils/error.h>
22 #include <mailutils/errno.h> 23 #include <mailutils/errno.h>
23 #include <mailutils/url.h> 24 #include <mailutils/url.h>
24 25
......
...@@ -789,14 +789,13 @@ void ...@@ -789,14 +789,13 @@ void
789 cond_before (struct parsebuf *pb) 789 cond_before (struct parsebuf *pb)
790 { 790 {
791 time_t t = (time_t)_search_arg (pb); 791 time_t t = (time_t)_search_arg (pb);
792 time_t mesg_time; 792 time_t mesg_time = 0;
793 const char *date; 793 const char *date;
794 mu_envelope_t env; 794 mu_envelope_t env;
795 795
796 mu_message_get_envelope (pb->msg, &env); 796 mu_message_get_envelope (pb->msg, &env);
797 if (mu_envelope_sget_date (env, &date)) 797 if (mu_envelope_sget_date (env, &date) == 0)
798 return 0; 798 util_parse_ctime_date (date, &mesg_time);
799 util_parse_ctime_date (date, &mesg_time);
800 _search_push (pb, mesg_time < t); 799 _search_push (pb, mesg_time < t);
801 } 800 }
802 801
...@@ -859,14 +858,13 @@ void ...@@ -859,14 +858,13 @@ void
859 cond_on (struct parsebuf *pb) 858 cond_on (struct parsebuf *pb)
860 { 859 {
861 time_t t = (time_t)_search_arg (pb); 860 time_t t = (time_t)_search_arg (pb);
862 time_t mesg_time; 861 time_t mesg_time = 0;
863 const char *date; 862 const char *date;
864 mu_envelope_t env; 863 mu_envelope_t env;
865 864
866 mu_message_get_envelope (pb->msg, &env); 865 mu_message_get_envelope (pb->msg, &env);
867 if (mu_envelope_sget_date (env, &date)) 866 if (mu_envelope_sget_date (env, &date) == 0)
868 return 0; 867 util_parse_ctime_date (date, &mesg_time);
869 util_parse_ctime_date (date, &mesg_time);
870 _search_push (pb, t <= mesg_time && mesg_time <= t + 86400); 868 _search_push (pb, t <= mesg_time && mesg_time <= t + 86400);
871 } 869 }
872 870
...@@ -904,14 +902,13 @@ void ...@@ -904,14 +902,13 @@ void
904 cond_since (struct parsebuf *pb) 902 cond_since (struct parsebuf *pb)
905 { 903 {
906 time_t t = (time_t)_search_arg (pb); 904 time_t t = (time_t)_search_arg (pb);
907 time_t mesg_time; 905 time_t mesg_time = 0;
908 const char *date; 906 const char *date;
909 mu_envelope_t env; 907 mu_envelope_t env;
910 908
911 mu_message_get_envelope (pb->msg, &env); 909 mu_message_get_envelope (pb->msg, &env);
912 if (mu_envelope_sget_date (env, &date)) 910 if (mu_envelope_sget_date (env, &date) == 0)
913 return 0; 911 util_parse_ctime_date (date, &mesg_time);
914 util_parse_ctime_date (date, &mesg_time);
915 _search_push (pb, mesg_time >= t); 912 _search_push (pb, mesg_time >= t);
916 } 913 }
917 914
......
...@@ -139,7 +139,6 @@ int ...@@ -139,7 +139,6 @@ int
139 _folder_mbox_init (mu_folder_t folder) 139 _folder_mbox_init (mu_folder_t folder)
140 { 140 {
141 fmbox_t dfolder; 141 fmbox_t dfolder;
142 size_t name_len = 0;
143 int status = 0; 142 int status = 0;
144 143
145 /* We create an authority so the API is uniform across the mailbox 144 /* We create an authority so the API is uniform across the mailbox
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
23 #include <stdlib.h> 23 #include <stdlib.h>
24 #include <string.h> 24 #include <string.h>
25 #include <mailutils/errno.h> 25 #include <mailutils/errno.h>
26 #include <mailutils/mutil.h>
26 #include <envelope0.h> 27 #include <envelope0.h>
27 28
28 int 29 int
......
...@@ -402,7 +402,8 @@ _add_module_list (const char *modlist, int (*fun)(const char *name)) ...@@ -402,7 +402,8 @@ _add_module_list (const char *modlist, int (*fun)(const char *name))
402 if (errno == ENOENT) 402 if (errno == ENOENT)
403 mu_error ("no such module: %s", name); 403 mu_error ("no such module: %s", name);
404 else 404 else
405 mu_error ("failed to add module %s: %s", strerror (errno)); 405 mu_error ("failed to add module %s: %s",
406 name, strerror (errno));
406 exit (1); 407 exit (1);
407 } 408 }
408 } 409 }
......