diff options
Diffstat (limited to 'libsylph')
-rw-r--r-- | libsylph/filter.c | 7 | ||||
-rw-r--r-- | libsylph/imap.c | 4 | ||||
-rw-r--r-- | libsylph/mh.c | 6 | ||||
-rw-r--r-- | libsylph/news.c | 4 | ||||
-rw-r--r-- | libsylph/procmsg.c | 3 |
5 files changed, 16 insertions, 8 deletions
diff --git a/libsylph/filter.c b/libsylph/filter.c index e61b5095..182fbb27 100644 --- a/libsylph/filter.c +++ b/libsylph/filter.c @@ -822,6 +822,7 @@ void filter_write_file(GSList *list, const gchar *file) GSList *cur_cond; GSList *cur_action; gchar match_type[16]; + gchar nstr[16]; fputs(" <rule name=\"", pfile->fp); xml_file_put_escape_str(pfile->fp, rule->name); @@ -890,13 +891,13 @@ void filter_write_file(GSList *list, const gchar *file) NODE_NEW("command-test", cond->str_value); break; case FLT_COND_SIZE_GREATER: - NODE_NEW("size", itos(cond->int_value)); + NODE_NEW("size", itos_buf(nstr, cond->int_value)); ADD_ATTR("type", FLT_IS_NOT_MATCH(cond->match_flag) ? "lt" : "gt"); break; case FLT_COND_AGE_GREATER: - NODE_NEW("age", itos(cond->int_value)); + NODE_NEW("age", itos_buf(nstr, cond->int_value)); ADD_ATTR("type", FLT_IS_NOT_MATCH(cond->match_flag) ? "lt" : "gt"); @@ -926,7 +927,7 @@ void filter_write_file(GSList *list, const gchar *file) ? "is-not" : "is"); break; case FLT_COND_ACCOUNT: - NODE_NEW("account-id", itos(cond->int_value)); + NODE_NEW("account-id", itos_buf(nstr, cond->int_value)); break; default: break; diff --git a/libsylph/imap.c b/libsylph/imap.c index 129c0485..2a685f43 100644 --- a/libsylph/imap.c +++ b/libsylph/imap.c @@ -1194,6 +1194,7 @@ static gchar *imap_fetch_msg(Folder *folder, FolderItem *item, gint uid) { gchar *path, *filename; IMAPSession *session; + gchar nstr[16]; gint ok; g_return_val_if_fail(folder != NULL, NULL); @@ -1202,7 +1203,8 @@ static gchar *imap_fetch_msg(Folder *folder, FolderItem *item, gint uid) path = folder_item_get_path(item); if (!is_dir_exist(path)) make_dir_hier(path); - filename = g_strconcat(path, G_DIR_SEPARATOR_S, itos(uid), NULL); + filename = g_strconcat(path, G_DIR_SEPARATOR_S, itos_buf(nstr, uid), + NULL); g_free(path); if (is_file_exist(filename)) { diff --git a/libsylph/mh.c b/libsylph/mh.c index 2618626b..71eb2a26 100644 --- a/libsylph/mh.c +++ b/libsylph/mh.c @@ -351,6 +351,7 @@ static gchar *mh_fetch_msg(Folder *folder, FolderItem *item, gint num) { gchar *path; gchar *file; + gchar buf[16]; g_return_val_if_fail(item != NULL, NULL); g_return_val_if_fail(num > 0, NULL); @@ -364,7 +365,7 @@ static gchar *mh_fetch_msg(Folder *folder, FolderItem *item, gint num) return NULL; path = folder_item_get_path(item); - file = g_strconcat(path, G_DIR_SEPARATOR_S, itos(num), NULL); + file = g_strconcat(path, G_DIR_SEPARATOR_S, itos_buf(buf, num), NULL); g_free(path); if (!is_file_exist(file)) { g_free(file); @@ -930,8 +931,9 @@ static gboolean mh_is_msg_changed(Folder *folder, FolderItem *item, MsgInfo *msginfo) { struct stat s; + gchar buf[16]; - if (g_stat(itos(msginfo->msgnum), &s) < 0 || + if (g_stat(itos_buf(buf, msginfo->msgnum), &s) < 0 || msginfo->size != s.st_size || msginfo->mtime != s.st_mtime) return TRUE; diff --git a/libsylph/news.c b/libsylph/news.c index 498d283e..69dc0c29 100644 --- a/libsylph/news.c +++ b/libsylph/news.c @@ -371,6 +371,7 @@ static gchar *news_fetch_msg(Folder *folder, FolderItem *item, gint num) { gchar *path, *filename; NNTPSession *session; + gchar nstr[16]; gint ok; g_return_val_if_fail(folder != NULL, NULL); @@ -379,7 +380,8 @@ static gchar *news_fetch_msg(Folder *folder, FolderItem *item, gint num) path = folder_item_get_path(item); if (!is_dir_exist(path)) make_dir_hier(path); - filename = g_strconcat(path, G_DIR_SEPARATOR_S, itos(num), NULL); + filename = g_strconcat(path, G_DIR_SEPARATOR_S, itos_buf(nstr, num), + NULL); g_free(path); if (is_file_exist(filename)) { diff --git a/libsylph/procmsg.c b/libsylph/procmsg.c index e5c37123..3dde7a0e 100644 --- a/libsylph/procmsg.c +++ b/libsylph/procmsg.c @@ -1309,9 +1309,10 @@ gchar *procmsg_get_message_file_path(MsgInfo *msginfo) else if (msginfo->file_path) return g_strdup(msginfo->file_path); else { + gchar nstr[16]; path = folder_item_get_path(msginfo->folder); file = g_strconcat(path, G_DIR_SEPARATOR_S, - itos(msginfo->msgnum), NULL); + itos_buf(nstr, msginfo->msgnum), NULL); g_free(path); } |