[libc-commits] [PATCH] D82134: Add strcmp.

Alex Brachet via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jun 18 18:35:58 PDT 2020


abrachet added a comment.

FWIW, this is a good candidate for fuzz testing



================
Comment at: libc/src/string/strcmp.cpp:16-21
+  while (*l) {
+    if (*l != *r)
+      break;
+    ++l;
+    ++r;
+  }
----------------
`for ( ; *l && *l == *r; ++l, ++r);` maybe


================
Comment at: libc/src/string/strcmp.h:12
+
+#include "include/string.h"
+
----------------
No need for this include


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82134/new/

https://reviews.llvm.org/D82134





More information about the libc-commits mailing list