aboutsummaryrefslogtreecommitdiff
path: root/qemu-common.h
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-09 00:28:40 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-09 00:28:40 +0000
commitac4b0d0c4feb291643c0e8a07a92e449e13881b5 (patch)
treeeaa7265c8e10149b0fe4a7a3a8c995b1026cd1ae /qemu-common.h
parentdc72ac14d8ceeaac0ca63f385ba3f44fd580b963 (diff)
Add qemu_strndup: qemu_strdup with length limit.
Also optimise qemu_strdup by using memcpy - using pstrcpy is usually suboptimal. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5653 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'qemu-common.h')
-rw-r--r--qemu-common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/qemu-common.h b/qemu-common.h
index 2b7f7e1a10..f5480dd7ac 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -98,6 +98,7 @@ void *qemu_realloc(void *ptr, size_t size);
void *qemu_mallocz(size_t size);
void qemu_free(void *ptr);
char *qemu_strdup(const char *str);
+char *qemu_strndup(const char *str, size_t size);
void *get_mmap_addr(unsigned long size);