[sanitizer] zx_cprng_draw no longer takes the output argument
authorPetr Hosek <phosek@chromium.org>
Wed, 27 Jun 2018 16:49:37 +0000 (16:49 +0000)
committerPetr Hosek <phosek@chromium.org>
Wed, 27 Jun 2018 16:49:37 +0000 (16:49 +0000)
The zx_cprng_draw system call no longer takes the output argument.

Differential Revision: https://reviews.llvm.org/D48657

llvm-svn: 335755

compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc

index fa5c82a..a381369 100644 (file)
@@ -472,9 +472,7 @@ uptr MainThreadStackBase, MainThreadStackSize;
 
 bool GetRandom(void *buffer, uptr length, bool blocking) {
   CHECK_LE(length, ZX_CPRNG_DRAW_MAX_LEN);
-  size_t size;
-  CHECK_EQ(_zx_cprng_draw(buffer, length, &size), ZX_OK);
-  CHECK_EQ(size, length);
+  CHECK_EQ(_zx_cprng_draw(buffer, length), ZX_OK);
   return true;
 }