aboutsummaryrefslogtreecommitdiffstats
path: root/common/stringhelp.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/stringhelp.c')
-rw-r--r--common/stringhelp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/common/stringhelp.c b/common/stringhelp.c
index dc5911ca6..5baaa1b2b 100644
--- a/common/stringhelp.c
+++ b/common/stringhelp.c
@@ -1167,9 +1167,10 @@ try_percent_escape (const char *str, const char *extra)
}
-
-static char *
-do_strconcat (const char *s1, va_list arg_ptr)
+/* Same as strconcat but takes a va_list. Returns EINVAL if the list
+ * is too long, all other errors are due to an ENOMEM condition. */
+char *
+vstrconcat (const char *s1, va_list arg_ptr)
{
const char *argv[48];
size_t argc;
@@ -1214,7 +1215,7 @@ strconcat (const char *s1, ...)
else
{
va_start (arg_ptr, s1);
- result = do_strconcat (s1, arg_ptr);
+ result = vstrconcat (s1, arg_ptr);
va_end (arg_ptr);
}
return result;
@@ -1233,7 +1234,7 @@ xstrconcat (const char *s1, ...)
else
{
va_start (arg_ptr, s1);
- result = do_strconcat (s1, arg_ptr);
+ result = vstrconcat (s1, arg_ptr);
va_end (arg_ptr);
}
if (!result)