aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-12-28 03:44:21 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-12-28 03:44:21 +0800
commit2db0cad78c8f91531897cc4fd857ecee7474f4df (patch)
tree8e1d0b61e276d171758088fd5b4d80ac1ab3717a /mail
parent8080d58ec309459e295be770bc7763f109bdf94b (diff)
downloadgsoc2013-evolution-2db0cad78c8f91531897cc4fd857ecee7474f4df.tar.gz
gsoc2013-evolution-2db0cad78c8f91531897cc4fd857ecee7474f4df.tar.zst
gsoc2013-evolution-2db0cad78c8f91531897cc4fd857ecee7474f4df.zip
Replace alloca() with g_alloca().
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-migrate.c4
-rw-r--r--mail/e-searching-tokenizer.c8
-rw-r--r--mail/em-account-editor.c2
-rw-r--r--mail/em-folder-tree-model.c2
-rw-r--r--mail/em-format-html.c2
-rw-r--r--mail/mail-mt.c2
-rw-r--r--mail/message-list.c6
7 files changed, 13 insertions, 13 deletions
diff --git a/mail/e-mail-migrate.c b/mail/e-mail-migrate.c
index 04805324b6..f67ea38c5b 100644
--- a/mail/e-mail-migrate.c
+++ b/mail/e-mail-migrate.c
@@ -1322,13 +1322,13 @@ get_local_store_uri (const gchar *dirname, gchar **namep, gint *indexp)
if (node->name && !strcmp ((gchar *)node->name, "folder")) {
tmp = (gchar *)xmlGetProp (node, (const guchar *)"type");
if (tmp) {
- protocol = alloca(strlen(tmp)+1);
+ protocol = g_alloca(strlen(tmp)+1);
strcpy(protocol, tmp);
xmlFree(tmp);
}
tmp = (gchar *)xmlGetProp (node, (const guchar *)"name");
if (tmp) {
- name = alloca(strlen(tmp)+1);
+ name = g_alloca(strlen(tmp)+1);
strcpy(name, tmp);
xmlFree(tmp);
}
diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c
index 4a3b6a9bac..8920a7dd21 100644
--- a/mail/e-searching-tokenizer.c
+++ b/mail/e-searching-tokenizer.c
@@ -98,7 +98,7 @@ static const gchar *ignored_tags[] = {
static gint
ignore_tag (const gchar *tag)
{
- gchar *t = alloca(strlen(tag)+1), c, *out;
+ gchar *t = g_alloca(strlen(tag)+1), c, *out;
const gchar *in;
gint i;
@@ -163,7 +163,7 @@ struct _trie {
static void
dump_trie (struct _state *s, gint d)
{
- gchar *p = alloca(d*2+1);
+ gchar *p = g_alloca(d*2+1);
struct _match *m;
memset(p, ' ', d*2);
@@ -890,9 +890,9 @@ search_info_to_searcher (struct _search_info *si)
else
col = si->color;
- tags = alloca(20+strlen(col));
+ tags = g_alloca(20+strlen(col));
sprintf(tags, "%c<font color=\"%s\">", TAG_ESCAPE, col);
- tage = alloca(20);
+ tage = g_alloca(20);
sprintf(tage, "%c</font>", TAG_ESCAPE);
return searcher_new (si->flags, si->strv->len, (guchar **)si->strv->pdata, tags, tage);
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 88912a4517..e3e9613e2e 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -3153,7 +3153,7 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data)
emae->priv->management_set = 1;
tmp = e_account_get_string (account, E_ACCOUNT_ID_ADDRESS);
len = strlen (tmp);
- template = alloca (len + 14);
+ template = g_alloca (len + 14);
strcpy (template, tmp);
while (e_get_account_by_name (template))
sprintf (template + len, " (%d)", i++);
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index 545c934805..c0840434c1 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -778,7 +778,7 @@ folder_subscribed (CamelStore *store,
goto done;
/* get our parent folder's path */
- dirname = alloca(strlen(fi->full_name)+1);
+ dirname = g_alloca(strlen(fi->full_name)+1);
strcpy(dirname, fi->full_name);
p = strrchr(dirname, '/');
if (p == NULL) {
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 86ad0a5701..b9db3d16e4 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -2376,7 +2376,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
gchar *str_field = NULL;
gint i;
- name = alloca(strlen(header->name)+1);
+ name = g_alloca(strlen(header->name)+1);
strcpy(name, header->name);
canon_header_name (name);
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index 3695800bc7..4c7c049745 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -854,7 +854,7 @@ op_status_exec (struct _op_status_msg *m)
data = msg->priv;
- out = alloca (strlen (m->what) * 2 + 1);
+ out = g_alloca (strlen (m->what) * 2 + 1);
o = out;
p = m->what;
while ((c = *p++)) {
diff --git a/mail/message-list.c b/mail/message-list.c
index 49a839a7ba..6a674bec82 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -4380,13 +4380,13 @@ regen_list_exec (struct _regen_list_msg *m)
} else if (m->hidedel) {
if (m->hidejunk) {
if (m->search) {
- expr = alloca(strlen(m->search) + 92);
+ expr = g_alloca(strlen(m->search) + 92);
sprintf(expr, "(and (match-all (and (not (system-flag \"deleted\")) (not (system-flag \"junk\"))))\n %s)", m->search);
} else
expr = (gchar *) "(match-all (and (not (system-flag \"deleted\")) (not (system-flag \"junk\"))))";
} else {
if (m->search) {
- expr = alloca(strlen(m->search) + 64);
+ expr = g_alloca(strlen(m->search) + 64);
sprintf(expr, "(and (match-all (not (system-flag \"deleted\")))\n %s)", m->search);
} else
expr = (gchar *) "(match-all (not (system-flag \"deleted\")))";
@@ -4394,7 +4394,7 @@ regen_list_exec (struct _regen_list_msg *m)
} else {
if (m->hidejunk) {
if (m->search) {
- expr = alloca(strlen(m->search) + 64);
+ expr = g_alloca(strlen(m->search) + 64);
sprintf(expr, "(and (match-all (not (system-flag \"junk\")))\n %s)", m->search);
} else
expr = (gchar *) "(match-all (not (system-flag \"junk\")))";