We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcf9b4f commit 4eebc84Copy full SHA for 4eebc84
libc/src/wchar/wmemcmp.cpp
@@ -12,11 +12,14 @@
12
#include "hdr/types/wchar_t.h"
13
#include "src/__support/common.h"
14
#include "src/__support/macros/config.h"
15
+#include "src/__support/macros/null_check.h" // LIBC_CRASH_ON_NULLPTR
16
17
namespace LIBC_NAMESPACE_DECL {
18
19
LLVM_LIBC_FUNCTION(int, wmemcmp,
20
(const wchar_t *s1, const wchar_t *s2, size_t n)) {
21
+ LIBC_CRASH_ON_NULLPTR(s1);
22
+ LIBC_CRASH_ON_NULLPTR(s2);
23
for (size_t i = 0; i < n; ++i) {
24
if (s1[i] != s2[i])
25
return (int)(s1[i] - s2[i]);
0 commit comments