summaryrefslogtreecommitdiff
path: root/lib/libc/string/wmemmove.c
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>2001-01-03 14:29:36 +0000
committerlukem <lukem@NetBSD.org>2001-01-03 14:29:36 +0000
commit5ba790cb50cfef45bfe89d903c0c42855588db95 (patch)
tree5c73595c4e3ef8f28ee61b744e11d4f1cb9c51c7 /lib/libc/string/wmemmove.c
parent0c55b7011c9e0922ccdc05cead51031905f064ed (diff)
sprinkle in _DIAGASSERT() as appropriate
Diffstat (limited to 'lib/libc/string/wmemmove.c')
-rw-r--r--lib/libc/string/wmemmove.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/libc/string/wmemmove.c b/lib/libc/string/wmemmove.c
index 3f8e4cec813..d193e69194c 100644
--- a/lib/libc/string/wmemmove.c
+++ b/lib/libc/string/wmemmove.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wmemmove.c,v 1.1 2000/12/23 23:14:37 itojun Exp $ */
+/* $NetBSD: wmemmove.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@@ -30,11 +30,12 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wmemmove.c,v 1.1 2000/12/23 23:14:37 itojun Exp $");
+__RCSID("$NetBSD: wmemmove.c,v 1.2 2001/01/03 14:29:37 lukem Exp $");
#endif /* LIBC_SCCS and not lint */
-#include <wchar.h>
+#include <assert.h>
#include <string.h>
+#include <wchar.h>
wchar_t *
wmemmove(d, s, n)
@@ -42,5 +43,9 @@ wmemmove(d, s, n)
const wchar_t *s;
size_t n;
{
+
+ _DIAGASSERT(d != NULL);
+ _DIAGASSERT(s != NULL);
+
return (wchar_t *)memmove(d, s, n * sizeof(wchar_t));
}