diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2011-06-28 07:22:24 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2011-06-28 07:22:24 +0000 |
commit | b3428b720c8c4ba59a4539542a0bf3e3a131bde8 (patch) | |
tree | d03f5969dc1e4c3cd9d8ff29bb0af65d09589afc | |
parent | c88da1f3d24c89cd80b2418a2c6cfe40567fd67e (diff) |
libsylph/xml.c: xml_unescape_str(): removed alloca() call.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2918 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | libsylph/xml.c | 12 |
2 files changed, 6 insertions, 7 deletions
@@ -4,6 +4,7 @@ * src/account_dialog.c: account_open(): removed alloca() call. * src/folderview.c: removed alloca() calls. * src/undo.c: undo_insert_text_cb(): removed alloca() call. + * libsylph/xml.c: xml_unescape_str(): removed alloca() call. 2011-06-24 diff --git a/libsylph/xml.c b/libsylph/xml.c index 23b98506..e641e84d 100644 --- a/libsylph/xml.c +++ b/libsylph/xml.c @@ -480,7 +480,6 @@ gint xml_unescape_str(gchar *str) gchar *start; gchar *end; gchar *p = str; - gchar *esc_str; gchar ch; gint len; @@ -496,16 +495,15 @@ gint xml_unescape_str(gchar *str) continue; } - Xstrndup_a(esc_str, start, len, return -1); - if (!strcmp(esc_str, "<")) + if (!strncmp(start, "<", 4)) ch = '<'; - else if (!strcmp(esc_str, ">")) + else if (!strncmp(start, ">", 4)) ch = '>'; - else if (!strcmp(esc_str, "&")) + else if (!strncmp(start, "&", 5)) ch = '&'; - else if (!strcmp(esc_str, "'")) + else if (!strncmp(start, "'", 6)) ch = '\''; - else if (!strcmp(esc_str, """)) + else if (!strncmp(start, """, 6)) ch = '\"'; else { p = end + 1; |