diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-03-24 17:02:20 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-03-20 15:25:40 +0100 |
commit | 998bf873bf25fc8e8a326b03fdda11e79ed8b83c (patch) | |
tree | b2040554ea1a497ce13242b0f1fe94664354de29 /common/mem.h | |
parent | a12f3fe2421f121656f7a142873c278ee72be10c (diff) | |
download | spice-common-998bf873bf25fc8e8a326b03fdda11e79ed8b83c.tar.gz spice-common-998bf873bf25fc8e8a326b03fdda11e79ed8b83c.tar.xz spice-common-998bf873bf25fc8e8a326b03fdda11e79ed8b83c.zip |
Add spice_strndup
Also, make str(n)dup handle NULL correctly
Diffstat (limited to 'common/mem.h')
-rw-r--r-- | common/mem.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/mem.h b/common/mem.h index f5fab20..350e421 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); |