aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/imap/camel-imap-utils.c')
-rw-r--r--camel/providers/imap/camel-imap-utils.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/camel/providers/imap/camel-imap-utils.c b/camel/providers/imap/camel-imap-utils.c
index fc507398db..bb8fdef00a 100644
--- a/camel/providers/imap/camel-imap-utils.c
+++ b/camel/providers/imap/camel-imap-utils.c
@@ -20,6 +20,7 @@
*
*/
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -30,10 +31,6 @@
#include <time.h>
#include <errno.h>
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
-
#include "camel-imap-utils.h"
#include "camel-imap-summary.h"
#include "camel-imap-store.h"
@@ -1010,17 +1007,17 @@ imap_uid_array_to_set (CamelFolderSummary *summary, GPtrArray *uids, int uid, ss
range = TRUE;
else {
if (range) {
- g_string_sprintfa (gset, ":%lu", last_uid);
+ g_string_append_printf (gset, ":%lu", last_uid);
range = FALSE;
}
- g_string_sprintfa (gset, ",%lu", this_uid);
+ g_string_append_printf (gset, ",%lu", this_uid);
}
last_uid = this_uid;
}
if (range)
- g_string_sprintfa (gset, ":%lu", last_uid);
+ g_string_append_printf (gset, ":%lu", last_uid);
*lastuid = uid;
@@ -1136,21 +1133,21 @@ imap_mailbox_encode (const unsigned char *in, size_t inlen)
{
char *buf;
- buf = alloca(inlen+1);
- memcpy(buf, in, inlen);
+ buf = g_alloca (inlen + 1);
+ memcpy (buf, in, inlen);
buf[inlen] = 0;
-
- return camel_utf8_utf7(buf);
+
+ return camel_utf8_utf7 (buf);
}
char *
imap_mailbox_decode (const unsigned char *in, size_t inlen)
{
char *buf;
-
- buf = alloca(inlen+1);
- memcpy(buf, in, inlen);
+
+ buf = g_alloca (inlen + 1);
+ memcpy (buf, in, inlen);
buf[inlen] = 0;
-
- return camel_utf7_utf8(buf);
+
+ return camel_utf7_utf8 (buf);
}