[libc-commits] [PATCH] D147346: [libc] Add strchrnul implementation

Caslyn Tonelli via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Mar 31 17:19:23 PDT 2023


Caslyn added inline comments.


================
Comment at: libc/src/string/strchrnul.cpp:20-21
+    ;
+  return *src == ch ? const_cast<char *>(src)
+                    : const_cast<char *>(src) + internal::string_length(src);
+}
----------------
michaelrj wrote:
> I think this can be simplified to just `return ch`.
Done (assumed you mean `src`).


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