Skip to content

Commit 91de0a2

Browse files
jinhuang1102Jin Huang
andauthored
[libc] Refactor libc code to improve readability. (llvm#153308)
The PR is going to improve the readability for the files under `llvm-project/libc/src/wchar` directory. --------- Co-authored-by: Jin Huang <[email protected]>
1 parent cf00284 commit 91de0a2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libc/src/wchar/wcsncmp.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ LLVM_LIBC_FUNCTION(int, wcsncmp,
3030
if (!comp(lc, '\0') || comp(lc, *right))
3131
break;
3232
}
33-
return comp(*reinterpret_cast<const wchar_t *>(left),
34-
*reinterpret_cast<const wchar_t *>(right));
33+
return comp(*left, *right);
3534
}
3635

3736
} // namespace LIBC_NAMESPACE_DECL

0 commit comments

Comments
 (0)