summaryrefslogtreecommitdiff
path: root/common/mem.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-03-24 17:02:20 +0100
committerAlexander Larsson <alexl@redhat.com>2010-03-24 17:02:20 +0100
commitce0d8a094c9d64e762b2b0ca451b043e85d202a5 (patch)
tree2cdcd0a65a46ec44e525bdce18a067caba28d6b9 /common/mem.h
parent4a36b98440df727bc16e2946853a5c9cb9f40094 (diff)
Add spice_strndup
Also, make str(n)dup handle NULL correctly
Diffstat (limited to 'common/mem.h')
-rw-r--r--common/mem.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/mem.h b/common/mem.h
index f5fab20a..350e421e 100644
--- a/common/mem.h
+++ b/common/mem.h
@@ -23,6 +23,7 @@
#include <spice/macros.h>
char *spice_strdup(const char *str) SPICE_GNUC_MALLOC;
+char *spice_strndup(const char *str, size_t n_bytes) SPICE_GNUC_MALLOC;
void *spice_memdup(const void *mem, size_t n_bytes) SPICE_GNUC_MALLOC;
void *spice_malloc(size_t n_bytes) SPICE_GNUC_MALLOC SPICE_GNUC_ALLOC_SIZE(1);
void *spice_malloc0(size_t n_bytes) SPICE_GNUC_MALLOC SPICE_GNUC_ALLOC_SIZE(1);