summaryrefslogtreecommitdiffstats
path: root/libcxx/src/random.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/src/random.cpp')
-rw-r--r--libcxx/src/random.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/src/random.cpp b/libcxx/src/random.cpp
index bd24f2e50c1..21e21689a87 100644
--- a/libcxx/src/random.cpp
+++ b/libcxx/src/random.cpp
@@ -49,7 +49,7 @@ random_device::operator()()
random_device::random_device(const string& __token)
: __f_(open(__token.c_str(), O_RDONLY))
{
- if (__f_ <= 0)
+ if (__f_ < 0)
__throw_system_error(errno, ("random_device failed to open " + __token).c_str());
}
OpenPOWER on IntegriCloud