Diffstat (limited to 'kmicromail/libetpan/generic/mboxdriver_message.c') (more/less context) (show whitespace changes)
-rw-r--r-- | kmicromail/libetpan/generic/mboxdriver_message.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kmicromail/libetpan/generic/mboxdriver_message.c b/kmicromail/libetpan/generic/mboxdriver_message.c index da9a65d..6922625 100644 --- a/kmicromail/libetpan/generic/mboxdriver_message.c +++ b/kmicromail/libetpan/generic/mboxdriver_message.c | |||
@@ -24,25 +24,25 @@ | |||
24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
29 | * SUCH DAMAGE. | 29 | * SUCH DAMAGE. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * $Id$ | 33 | * $Id$ |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include "mhdriver_message.h" | 36 | #include "mboxdriver_message.h" |
37 | 37 | ||
38 | #include "mailmessage_tools.h" | 38 | #include "mailmessage_tools.h" |
39 | #include "mboxdriver_tools.h" | 39 | #include "mboxdriver_tools.h" |
40 | #include "mboxdriver.h" | 40 | #include "mboxdriver.h" |
41 | #include "mailmbox.h" | 41 | #include "mailmbox.h" |
42 | 42 | ||
43 | #include <unistd.h> | 43 | #include <unistd.h> |
44 | #include <sys/mman.h> | 44 | #include <sys/mman.h> |
45 | #include <sys/types.h> | 45 | #include <sys/types.h> |
46 | #include <sys/stat.h> | 46 | #include <sys/stat.h> |
47 | #include <fcntl.h> | 47 | #include <fcntl.h> |
48 | #include <string.h> | 48 | #include <string.h> |
@@ -147,26 +147,26 @@ static int mbox_initialize(mailmessage * msg_info) | |||
147 | 147 | ||
148 | key.data = &msg_info->msg_index; | 148 | key.data = &msg_info->msg_index; |
149 | key.len = sizeof(msg_info->msg_index); | 149 | key.len = sizeof(msg_info->msg_index); |
150 | 150 | ||
151 | r = chash_get(folder->mb_hash, &key, &data); | 151 | r = chash_get(folder->mb_hash, &key, &data); |
152 | if (r < 0) { | 152 | if (r < 0) { |
153 | res = MAIL_ERROR_MSG_NOT_FOUND; | 153 | res = MAIL_ERROR_MSG_NOT_FOUND; |
154 | goto err; | 154 | goto err; |
155 | } | 155 | } |
156 | 156 | ||
157 | info = data.data; | 157 | info = data.data; |
158 | 158 | ||
159 | snprintf(static_uid, PATH_MAX, "%u-%u", | 159 | snprintf(static_uid, PATH_MAX, "%u-%lu", |
160 | msg_info->msg_index, info->msg_body_len); | 160 | msg_info->msg_index, (unsigned long) info->msg_body_len); |
161 | uid = strdup(static_uid); | 161 | uid = strdup(static_uid); |
162 | if (uid == NULL) { | 162 | if (uid == NULL) { |
163 | res = MAIL_ERROR_MEMORY; | 163 | res = MAIL_ERROR_MEMORY; |
164 | goto err; | 164 | goto err; |
165 | } | 165 | } |
166 | 166 | ||
167 | r = mailmessage_generic_initialize(msg_info); | 167 | r = mailmessage_generic_initialize(msg_info); |
168 | if (r != MAIL_NO_ERROR) { | 168 | if (r != MAIL_NO_ERROR) { |
169 | free(uid); | 169 | free(uid); |
170 | res = r; | 170 | res = r; |
171 | goto err; | 171 | goto err; |
172 | } | 172 | } |