aboutsummaryrefslogtreecommitdiffstats
path: root/g10/call-agent.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/call-agent.c')
-rw-r--r--g10/call-agent.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c
index b6c61aa0e..444048a47 100644
--- a/g10/call-agent.c
+++ b/g10/call-agent.c
@@ -116,32 +116,7 @@ start_agent (void)
static char *
unescape_status_string (const unsigned char *s)
{
- char *buffer, *d;
-
- buffer = d = xtrymalloc (strlen (s)+1);
- if (!buffer)
- return NULL;
- while (*s)
- {
- if (*s == '%' && s[1] && s[2])
- {
- s++;
- *d = xtoi_2 (s);
- if (!*d)
- *d = '\xff';
- d++;
- s += 2;
- }
- else if (*s == '+')
- {
- *d++ = ' ';
- s++;
- }
- else
- *d++ = *s++;
- }
- *d = 0;
- return buffer;
+ return percent_plus_unescape (s, 0xff);
}