[libc-commits] [PATCH] D147346: [libc] Add strchrnul implementation
Michael Jones via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Mar 31 15:59:23 PDT 2023
michaelrj accepted this revision.
michaelrj added a comment.
This revision is now accepted and ready to land.
LGTM after addressing the last comment.
================
Comment at: libc/src/string/strchrnul.cpp:20-21
+ ;
+ return *src == ch ? const_cast<char *>(src)
+ : const_cast<char *>(src) + internal::string_length(src);
+}
----------------
I think this can be simplified to just `return ch`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147346/new/
https://reviews.llvm.org/D147346
More information about the libc-commits
mailing list