[PATCH] [compiler-rt] Make MaybeReexec properly process DYLD_INSERT_LIBRARIES when using non-absolute paths

Alexey Samsonov vonosmas at gmail.com
Tue Jan 27 16:00:52 PST 2015


================
Comment at: lib/sanitizer_common/sanitizer_libc.cc:33
@@ +32,3 @@
+  const char *t = (const char *)s + n - 1;
+  for (uptr i = n; i > 0; --i, --t)
+    if (*t == c)
----------------
You can write it as follows:
  const char *t = (const char *)s;
  void *res = nullptr;
  for (uptr i = 0; i < n; ++i, ++t) {
    if (*t == c) res = reinterpret_cast<void*>(...);
  }
  return res;

http://reviews.llvm.org/D7160

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list