Skip to content

Commit f817746

Browse files
author
Sriya Pratipati
committed
fixed return logic
1 parent 2f0b885 commit f817746

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

libc/src/wchar/wcpcpy.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ LLVM_LIBC_FUNCTION(wchar_t *, wcpcpy,
2121
size_t size = internal::string_length(s2);
2222
__builtin_memcpy(s1, s2, (size + 1) * sizeof(wchar_t));
2323
wchar_t *result = s1 + size;
24-
if (result != nullptr)
25-
return result;
26-
return nullptr;
24+
return result;
2725
}
2826

2927
} // namespace LIBC_NAMESPACE_DECL

0 commit comments

Comments
 (0)