aboutsummaryrefslogtreecommitdiff
path: root/libbb/xfuncs_printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/xfuncs_printf.c')
-rw-r--r--libbb/xfuncs_printf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c
index e4ac6a002..73488908d 100644
--- a/libbb/xfuncs_printf.c
+++ b/libbb/xfuncs_printf.c
@@ -112,6 +112,11 @@ char* FAST_FUNC xstrndup(const char *s, int n)
112 return memcpy(t, s, n); 112 return memcpy(t, s, n);
113} 113}
114 114
115void* FAST_FUNC xmemdup(const void *s, int n)
116{
117 return memcpy(xmalloc(n), s, n);
118}
119
115// Die if we can't open a file and return a FILE* to it. 120// Die if we can't open a file and return a FILE* to it.
116// Notice we haven't got xfread(), This is for use with fscanf() and friends. 121// Notice we haven't got xfread(), This is for use with fscanf() and friends.
117FILE* FAST_FUNC xfopen(const char *path, const char *mode) 122FILE* FAST_FUNC xfopen(const char *path, const char *mode)