aboutsummaryrefslogtreecommitdiffstats
path: root/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils.c')
-rwxr-xr-xutils.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index 742b4872e..b73e4fcdb 100755
--- a/utils.c
+++ b/utils.c
@@ -418,6 +418,15 @@ int ast_wait_for_input(int fd, int ms)
return poll(pfd, 1, ms);
}
+void ast_copy_string(char *dst, const char *src, size_t size)
+{
+ while (*src && size--)
+ *dst++ = *src++;
+ if (__builtin_expect(!size, 0))
+ dst--;
+ *dst = '\0';
+}
+
/* Case-insensitive substring matching */
#ifndef LINUX
static char *upper(const char *orig, char *buf, int bufsize)