summaryrefslogtreecommitdiff
path: root/test/sanitizer_common
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-06-12 09:27:18 +0000
committerPeter Wu <peter@lekensteyn.nl>2018-06-12 09:27:18 +0000
commitc7ce5b706fea58c929b9fa6e6fc9239dd0c4e74c (patch)
treec7f4f036574bbb53258e620f329f75e1c0464f3b /test/sanitizer_common
parent31049741a2a2c58ebe04fc2e13b62ae8398945f4 (diff)
[ASAN] fix fgets and fgets_fputs tests failure
Some systems (Android) might not have /etc/passwd. Fixes r334450. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@334487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/sanitizer_common')
-rw-r--r--test/sanitizer_common/TestCases/Posix/fgets.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/sanitizer_common/TestCases/Posix/fgets.cc b/test/sanitizer_common/TestCases/Posix/fgets.cc
index 4eda4c1fc..8dde5cd1a 100644
--- a/test/sanitizer_common/TestCases/Posix/fgets.cc
+++ b/test/sanitizer_common/TestCases/Posix/fgets.cc
@@ -2,12 +2,12 @@
#include <stdio.h>
-int main(void) {
+int main(int argc, char **argv) {
FILE *fp;
char buf[2];
char *s;
- fp = fopen("/etc/passwd", "r");
+ fp = fopen(argv[0], "r");
if (!fp)
return 1;